Config Files Parameter
Published 15 January 2025
Description
The Flyway configuration files to load (in addition to those loaded automatically).
Relative paths will be resolved against the Working Directory.
Note: It is possible to have Flyway read from the standard input using the special option -configFiles=-
.
It is simpler to use environment variables and/or variable substitution if you need more dynamic configuration.
Type
String array
Default
[]
Usage
Command-line
./flyway -configFiles="my.toml" info
To pass in multiple files, separate their names with commas:
./flyway -configFiles=path/to/myAlternativeConfig.toml,other.toml migrate
This will also work with .conf
config files.
Command-line via standard input
Read a single option from echo
:
echo $'flyway.url=jdbc:h2:mem:mydb' | flyway info -configFiles=-
Read multiple options from echo
, delimited by newlines:
echo $'flyway.url=jdbc:h2:mem:mydb\nflyway.user=sa' | flyway info -configFiles=-
Use cat
to read a config file and pipe it directly into Flyway:
cat flyway.conf | flyway migrate -configFiles=-
Use gpg
to encrypt a config file, then pipe it into Flyway.
Encrypt the config file:
gpg -e -r "Your Name" flyway.conf
Decrypt the file and pipe it to Flyway:
gpg -d -q flyway.conf.gpg | flyway info -configFiles=-
Environment Variable
FLYWAY_CONFIG_FILES=my.toml
API
Not available
Gradle
flyway {
configFiles = ['my.conf']
}
Maven
<configuration>
<configFiles>
<configFile>my.conf</configFile>
</configFiles>
</configuration>