services:
  mycofi-earth-website:
    build:
      context: .
      dockerfile: Dockerfile
    image: mycofi-earth-website:latest
    container_name: mycofi-earth-website
    restart: unless-stopped
    environment:
      - NODE_ENV=production
      - HOSTNAME=0.0.0.0
      - PORT=3000
      - GEMINI_API_KEY=${GEMINI_API_KEY}
    volumes:
      - zine-data:/app/data
    networks:
      - mycofi-network
      - traefik-public
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.mycofi.rule=Host(`mycofi.earth`) || Host(`www.mycofi.earth`) || Host(`zine.mycofi.earth`)"
      - "traefik.http.routers.mycofi.entrypoints=web"
      - "traefik.http.services.mycofi.loadbalancer.server.port=3000"
      - "traefik.docker.network=traefik-public"

volumes:
  zine-data:
    driver: local

networks:
  mycofi-network:
    driver: bridge
  traefik-public:
    external: true
