diff --git a/Dockerfile.flyway b/Dockerfile.flyway index 3f607a6..9e29a19 100644 --- a/Dockerfile.flyway +++ b/Dockerfile.flyway @@ -1,7 +1,4 @@ FROM flyway/flyway:10.15-alpine - -# Copy the migration files -COPY migration /flyway/sql/ - -# Copy the flyway.conf file -COPY flyway.conf /flyway/conf/ \ No newline at end of file +COPY ./migration/sql /flyway/sql/ +COPY flyway.conf /flyway/conf/ +CMD ["migrate", "-X"] \ No newline at end of file diff --git a/flyway.conf b/flyway.conf index 5929d37..b8b36f9 100644 --- a/flyway.conf +++ b/flyway.conf @@ -1,4 +1,5 @@ flyway.url=${FLYWAY_URL} flyway.user=${FLYWAY_USER} flyway.password=${FLYWAY_PASSWORD} -flyway.locations=/flyway/sql/ \ No newline at end of file +flyway.createSchemas=true +flyway.locations=filesystem:/flyway/sql \ No newline at end of file diff --git a/migration/V1_1__install_extension.sql b/migration/sql/V1_1__install_extension.sql similarity index 100% rename from migration/V1_1__install_extension.sql rename to migration/sql/V1_1__install_extension.sql diff --git a/migration/V1_2__create_cve_schema.sql b/migration/sql/V1_2__create_cve_schema.sql similarity index 100% rename from migration/V1_2__create_cve_schema.sql rename to migration/sql/V1_2__create_cve_schema.sql diff --git a/migration/V1_3__create_cve_table.sql b/migration/sql/V1_3__create_cve_table.sql similarity index 100% rename from migration/V1_3__create_cve_table.sql rename to migration/sql/V1_3__create_cve_table.sql diff --git a/migration/V1_4__create_version_trigger.sql b/migration/sql/V1_4__create_version_trigger.sql similarity index 100% rename from migration/V1_4__create_version_trigger.sql rename to migration/sql/V1_4__create_version_trigger.sql