---

version: "3"

services:
  frontend:
    container_name: frontend
    restart: unless-stopped
    build:
      context: .
      dockerfile: ./production.frontend.Dockerfile
      args:
        CUSTOM_UID: 1000
        CUSTOM_GID: 1000
    networks:
      - proxy
      - medwings
    environment:
      TZ: Europe/Berlin
    ports:
      - "8000:3000"
  backend:
    container_name: backend
    restart: unless-stopped
    build:
      context: .
      dockerfile: ./production.backend.Dockerfile
      args:
        CUSTOM_UID: 1000
        CUSTOM_GID: 1000
    networks:
      - medwings
    expose:
      - "3001"
    environment:
      APP_NAME: "MEDWingS"
      ADMIN_EMAIL: "admin@example.com"
      DEBUG_MODE: "true"
      POSTGRES_HOST: "db"
      POSTGRES_PORT: "5432"
      POSTGRES_DB: "medwings"
      POSTGRES_USER: "medwings"
      POSTGRES_PASSWORD: "medwings"
  db:
    image: postgres
    container_name: db
    restart: unless-stopped
    networks:
      - medwings
    expose:
      - "5432"
    volumes:
      - /srv/medwings/db:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: "medwings"
      POSTGRES_USER: "medwings"
      POSTGRES_PASSWORD: "medwings"

networks:
  proxy:
    external: true
  medwings:
    external: false

...
