diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 2ea4a2cccec10d1babfe0381d7f4cb7d83bfd9ac..18e6481f2b3185c9f0ac2de5478067e618fff444 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -7,6 +7,7 @@ services: restart: always volumes: - ./initdb:/docker-entrypoint-initdb.d + - ./persistent_db:/var/lib/postgresql networks: - default environment: @@ -15,6 +16,7 @@ services: POSTGRES_PASSWORD: password http: container_name: ap_http + restart: always image: nginx volumes: - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf @@ -23,13 +25,16 @@ services: - traefik labels: - 'traefik.enable=true' - - 'traefik.backend=web' - - 'traefik.port=8000' + - 'traefik.backend=ap_http' + - 'traefik.port=80' - 'traefik.docker.network=traefik_net' - - 'traefik.frontend.rule=Host:antholont.ecrituresnumeriques.ca' + - 'traefik.frontend.rule=Host:prod-ap.ecrituresnumeriques.ca' app: container_name: ap_python - image: timoguic/antholont + restart: always + image: timoguic/antholont:stable + environment: + - DJANGO_SETTINGS_MODULE=anthology.settings.prod depends_on: - db networks: diff --git a/docker/start_antholont.sh b/docker/start_antholont.sh index 266875b1e1f8bcf0470b18aa8ced3e32c1c6c64f..0f82a03b18e19c6000d5124826dec3b06a66871f 100644 --- a/docker/start_antholont.sh +++ b/docker/start_antholont.sh @@ -1,5 +1,6 @@ #!/bin/bash -cd /code || exit +set -ex +cd /code python manage.py migrate python manage.py compilemessages python -m gunicorn -b 0.0.0.0:8000 anthology.wsgi \ No newline at end of file