Engineering Elixir Applications:

Ellie Fairholm @elliefairholm and Josep Giralt D’Lacoste @Gilacost,

Engineering Elixir Applications - Deploying app to Docker Swarm fails (Chapter 8)

When deploying the app via the terraform apply command the kanban_web containers fail to start with an error saying that the database does not exist. I do not see a way to run mix ecto.create when the stack comes up after deployment.

Am I missing something?

Hi @RobertCGouge. Thank you for sharing this.
You need to be sure that you override the command (CMD) used to start the web service in your compose.yaml file. It should look like this:

...
  web:
      ....
      command: >
          bash -c "bin/migrate && \ 
                   bin/server"
    ...

Please let us know it that works and if you still have issues,