Skip to content

Commit d20c13f

Browse files
feat: add Flyway repair step in Dockerfile to handle failed migrations
1 parent 34142a0 commit d20c13f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ RUN mvn dependency:go-offline
1212
# Copia o código-fonte.
1313
COPY src ./src
1414

15+
16+
# Run Flyway repair before packaging
17+
# This is useful if there were any failed migrations in previous builds
18+
RUN mvn flyway:repair
19+
20+
21+
1522
# Compila e empacota a aplicação.
1623
RUN mvn package -DskipTests
1724

0 commit comments

Comments
 (0)