mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
24 lines
520 B
Text
24 lines
520 B
Text
|
#!/bin/bash
|
||
|
|
||
|
# Always install assets
|
||
|
(cd /srv/philomena/assets && npm install)
|
||
|
|
||
|
# Always install mix dependencies
|
||
|
(cd /srv/philomena && mix deps.get)
|
||
|
|
||
|
# Sleep to allow Elasticsearch to finish initializing
|
||
|
# if it's not done doing whatever it does yet
|
||
|
echo -n "Waiting for Elasticsearch"
|
||
|
|
||
|
until wget -qO - localhost:9200; do
|
||
|
echo -n "."
|
||
|
sleep 2
|
||
|
done
|
||
|
|
||
|
echo
|
||
|
|
||
|
# Try to create the database if it doesn't exist yet
|
||
|
createdb -h localhost -U postgres philomena_dev && mix ecto.setup_dev
|
||
|
|
||
|
# Run the application
|
||
|
mix phx.server
|