version: '3.8'

services:
  chorus-blog:
    image: registry.home.deepblack.cloud/tony/chorus-blog:latest
    ports:
      - "3025:3025"
    environment:
      - NODE_ENV=production
      - NEXT_TELEMETRY_DISABLED=1
    volumes:
      - /rust/containers/PING/content/posts:/app/content/posts:ro
      - /rust/containers/PING/content/scheduled:/app/content/scheduled:ro
      - blog_logs:/app/.next/cache
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=tengig"
        - "traefik.http.routers.chorus-blog.rule=Host(`blog.chorus.services`)"
        - "traefik.http.routers.chorus-blog.entrypoints=web-secured"
        - "traefik.http.routers.chorus-blog.tls.certresolver=letsencryptresolver"
        - "traefik.http.services.chorus-blog.loadbalancer.server.port=3025"
        - "traefik.http.services.chorus-blog.loadbalancer.passhostheader=true"
      placement:
        constraints:
          - node.hostname == walnut

    networks:
      - tengig
      - blog

volumes:
  blog_logs:

networks:
  tengig:
    external: true
  blog:
    driver: overlay
