2018-08-20 21:06:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2018-12-30 13:30:36 +00:00
|
|
|
if [[ -z "$NO_CONFIG" ]]; then
|
|
|
|
ruby /conf/parser.rb /conf/config.yml > config/runtime-config.exs
|
|
|
|
fi
|
2018-12-24 22:20:17 +00:00
|
|
|
|
2018-12-30 13:30:36 +00:00
|
|
|
if [[ -n "$COMPILE_ONLY" ]]; then
|
2018-12-24 22:20:17 +00:00
|
|
|
mix deps.get
|
|
|
|
mix compile
|
2018-12-30 13:30:36 +00:00
|
|
|
exit 0
|
2018-12-24 22:20:17 +00:00
|
|
|
fi
|
|
|
|
|
2018-12-30 13:30:36 +00:00
|
|
|
# Assume that dependencies are compiled and ready to go.
|
|
|
|
# Remove this assumption when https://github.com/erlang/rebar3/issues/1627 is fixed.
|
|
|
|
mix compile
|
|
|
|
|
2018-12-24 22:20:17 +00:00
|
|
|
# Migrate db
|
2018-08-20 21:06:34 +00:00
|
|
|
mix ecto.create
|
|
|
|
mix ecto.migrate
|
2018-12-24 22:20:17 +00:00
|
|
|
|
|
|
|
# Off we go!
|
2018-08-20 21:06:34 +00:00
|
|
|
exec mix phx.server
|