build / Garde-fou (pull_request) Failing after 7s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (pull_request) Skipped
build / Images Harbor (web, Dockerfile) (pull_request) Skipped
build / Garde-fou (push) Failing after 8s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (push) Skipped
build / Images Harbor (web, Dockerfile) (push) Skipped
24 lines
636 B
Bash
24 lines
636 B
Bash
#!/bin/sh
|
|
# Demarrage de l'application.
|
|
#
|
|
# Les migrations tournent avant gunicorn, et un echec arrete le conteneur :
|
|
# une base a moitie migree derriere une application qui repond serait pire
|
|
# qu'une indisponibilite visible.
|
|
set -eu
|
|
|
|
if [ -n "${ENCLUME_DATABASE_URL:-}" ]; then
|
|
echo "enclume : migration de la base"
|
|
alembic upgrade head
|
|
else
|
|
echo "enclume : aucune base configuree, mode sans etat"
|
|
fi
|
|
|
|
exec gunicorn \
|
|
--bind 0.0.0.0:8080 \
|
|
--workers "${GUNICORN_WORKERS:-2}" \
|
|
--timeout "${GUNICORN_TIMEOUT:-30}" \
|
|
--access-logfile - \
|
|
--error-logfile - \
|
|
--forwarded-allow-ips '*' \
|
|
'enclume.webapp:create_app()'
|