version: '2.2'

services:
  db:
    image: postgres:15-alpine
    restart: always
    environment:
      - POSTGRES_USER=ingress_admin
      - POSTGRES_PASSWORD=your_secure_password
      - POSTGRES_DB=ingress_fs
    volumes:
      - postgres_data:/var/lib/postgresql/data

  backend:
    build: ./backend
    restart: always
    # Wir listen die Variablen direkt auf, falls env_file zickt
    environment:
      - SPREADSHEET_ID=1gCxxAakmUNDy4CPUo_xbjNbtHkdXH-UI3tYKYsjZpIQ
      - GOOGLE_APPLICATION_CREDENTIALS=/app/service_account.json
      - TELEGRAM_TOKEN=8601175049:AAEX6Rr8B07x4Zfow1KSTl5QooLwvmOylBM
    volumes:
      - ./backend/service_account.json:/app/service_account.json
    ports:
      - "8000:8000"
    depends_on:
      - db

  bot:
    build: ./bot
    restart: always
    environment:
      - TELEGRAM_TOKEN=8601175049:AAEX6Rr8B07x4Zfow1KSTl5QooLwvmOylBM
    depends_on:
      - backend

volumes:
  postgres_data: