Javascript to Elm
Elixir Ecto Models
- Author: Vários
- Narrator: Vários
- Publisher: Podcast
- Duration: 0:27:25
- More information
Informações:
Synopsis
Deploy Missing Piece Need for distillery to run migrations on deploy We need to create release tasks that will go in the root of lib. That will have a migration and / or seed function in it. Then in the rel/config.exs we a list of tuples that have the task command, what we want to refer to it as, and the the shell script that we want it to run. Remember mix isn’t installed on the prod machine! the shell script just calls bin/postit command Elixir.Postit.ReleaseTasks migrate Then we, to run migration on app launch for new builds, back in rel/config.ex we add set post_start_hooks: "rel/hooks/post_start" to env prod. in this directory we have a single shell script that will use nodetool to ping when the, not app, but BEAM? is up and running, and then run the migration. #!/usr/bin/env bash set +e while true; do nodetool ping EXIT_CODE=$? if [[ ${EXIT_CODE} -eq 0 ]]; then echo "Application is up!" break fi done set -e echo "Running migrations" bin/postit command Elixir.Release.Tasks