k107
k107

Reputation: 16440

Can a flyway config file include other config files?

I'm using the flyway command line tool. I'd like to setup different configuration settings for different environments (development/testing/production), but there will be some common settings. Ideally there can be a common.properties config, along with individual environment-specific configs (e.g. production.properties)

Does flyway support including properties from multiple config files in some way?

Upvotes: 1

Views: 3009

Answers (1)

Axel Fontaine
Axel Fontaine

Reputation: 35167

Yes, you can by exploiting the loading order of Flyway config files (http://flywaydb.org/documentation/commandline/#configFile)

Place the common settings in either

  • Flyway Install Dir/conf/flyway.conf
  • User Home Dir/flyway.conf
  • Current Dir/flyway.conf

You can then put the environment-specific properties in the file you specify with

-configFile=/path/to/envspecific.conf

Upvotes: 5

Related Questions