You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zeus/code/website/backend/app/docker-entrypoint.sh

23 lines
335 B
Bash

#!/usr/bin/env bash
# Wait for PostgreSQL
/usr/local/bin/wait-for-it.sh psql:5432 -s -q
if [ $? -eq 0 ]; then
cd /var/www
# Check if we are executing tests
if [ "$1" = "test" ]; then
lapis migrate $1
busted
# Run Application normally
else
lapis migrate
lapis server $1
fi
else
exit 5432 # PostgreSQL didn't load
fi