services:
  # Flutter Web App
  flutter-tank-web:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: flutter-tank-web
    restart: unless-stopped
    ports:
      - "8090:80"
    networks:
      - app-network
    environment:
      - TZ=Europe/Vienna
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.flutter-tank.rule=Host(`tanknew.joshihomeserver.ipv64.net`)"
      - "traefik.http.routers.flutter-tank.entrypoints=websecure"
      - "traefik.http.routers.flutter-tank.tls.certresolver=letsencrypt"
      - "traefik.http.services.flutter-tank.loadbalancer.server.port=80"

  # Optional: Reverse Proxy für PTV API (Production)
  ptv-proxy:
    build:
      context: ./proxy-server
      dockerfile: Dockerfile
    container_name: ptv-proxy
    restart: unless-stopped
    ports:
      - "3000:3000"
    networks:
      - app-network
    environment:
      - NODE_ENV=production
      - PORT=3000

networks:
  app-network:
    driver: bridge
