version: '3.8'

services:
  web:
    image: gitlab.cazzzer.com:5050/cazzzer/zendesk-access-controller:alpine
    env_file:
    - .env.prod
    volumes:
      - static:/access_controller/srv
    expose:
      - 8000
    depends_on:
    - db

  db:
    image: postgres:13-alpine
    volumes:
      - postgres_data:/var/lib/postgresql/data/
    expose:
      - 5432
    env_file:
      - .env.prod.db

  nginx:
    build: ./nginx
    volumes:
    - static:/srv/access_controller
    ports:
    - 8004:80
    depends_on:
      - web

volumes:
  postgres_data:
  static:
