Turn Off Flyway

We are moving the database migration process to the build phase of our CI/CD pipeline. Consequently, Flyway (or your specific migration tool) will be disabled within the application itself, preventing it from attempting to apply database migrations each time a container launches. This change resolves the concurrency issue where multiple containers might simultaneously attempt to apply the same migrations.


Update the Task Definition

1. Navigate to the ECS console. In the left navigation pane, select Task definitions. Select fcj-core-fargate-td and click Create new revision.

image

2. Scroll to Environment variables and click Add environment variable.

image

3. Configure the environment variable:

  • Key: Enter SPRING_FLYWAY_ENABLED
  • Value type: Select Value
  • Value: Enter false

image

4. Scroll to the bottom and click Create.

image

Redeploy the Service

1. Navigate to your ECS cluster dashboard. Select the fcj-core-svc service and click Update.

image

2. Configure deployment settings:

  • Check Force new deployment
  • For Task definition revision, select the latest revision

image

3. Scroll to the bottom and click Update.

image

4. Wait for the deployment to complete (this may take a few minutes).