copanier/docker/docker-compose.yml
TheCapsLock 1784884a80
Docker: plusieurs améliorations (voir détails ci-dessous) (#57)
* docker: using gunicorn
* cleanup
* Docker: many improvements, added docker-compose for development purpose
* display "sesame" on docker logs
* auto restart app container in case of crash
* dev mode: allow user to work on source code and synchronize changes with source code in "app" service
* dev mode: auto reload gunicorn workers on source code change
dev mode and data persistance
* Suppression log inutile

Co-authored-by: CapsLock <github@legeox.net>
2021-04-08 22:35:01 +02:00

20 lines
563 B
YAML

version: "3.9"
services:
app:
build:
context: ..
dockerfile: "./docker/Dockerfile"
command: /srv/copanier-venv/bin/gunicorn -k roll.worker.Worker copanier:app --bind 0.0.0.0:2244
volumes:
- "../copanier/db:/srv/copanier/db" # To persist database changes
restart: always
static:
image: "nginx:latest"
volumes:
- "../copanier/static:/srv/copanier_static/static:ro"
- "./nginx-default.conf:/etc/nginx/conf.d/default.conf:ro"
restart: always
depends_on:
- app
ports:
- 0.0.0.0:2244:80