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
