gigafibre-fsm/apps/ops/infra/docker-compose.yaml
louispaulb 13dcd4bf77 feat: add ops app + CONTEXT.md, simplify URL to /ops/
Ops app (Vue/Quasar PWA) with dispatch V2 integration, tag system,
customer 360, tickets, and dashboard. Served via standalone nginx
container at erp.gigafibre.ca/ops/ with Traefik StripPrefix + Authentik SSO.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 22:41:58 -04:00

48 lines
1.9 KiB
YAML

# Targo Ops — nginx container served at erp.gigafibre.ca/ops/
# Deploy: docker compose -f docker-compose.yaml up -d
#
# Requires:
# - Traefik proxy network
# - Authentik forwardAuth middleware in Traefik
#
# Routing:
# erp.gigafibre.ca/ops/* → Traefik → StripPrefix /ops → nginx (static SPA)
# erp.gigafibre.ca/api/* → ERPNext directly (same domain, no proxy needed)
services:
ops-frontend:
image: nginx:alpine
container_name: ops-frontend
restart: unless-stopped
volumes:
- /opt/ops-app:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- proxy
labels:
- "traefik.enable=true"
# Main router: erp.gigafibre.ca/ops/* with Authentik + StripPrefix
- "traefik.http.routers.ops.rule=Host(`erp.gigafibre.ca`) && PathPrefix(`/ops`)"
- "traefik.http.routers.ops.entrypoints=web,websecure"
- "traefik.http.routers.ops.middlewares=authentik@file,ops-strip@docker"
- "traefik.http.routers.ops.service=ops"
- "traefik.http.routers.ops.tls.certresolver=letsencrypt"
- "traefik.http.routers.ops.priority=200"
# StripPrefix middleware (removes /ops before sending to nginx)
- "traefik.http.middlewares.ops-strip.stripprefix.prefixes=/ops"
- "traefik.http.middlewares.ops-strip.stripprefix.forceSlash=false"
# Authentik outpost callback (required for login redirect)
- "traefik.http.routers.ops-ak.rule=Host(`erp.gigafibre.ca`) && PathPrefix(`/outpost.goauthentik.io/`)"
- "traefik.http.routers.ops-ak.entrypoints=web,websecure"
- "traefik.http.routers.ops-ak.middlewares=authentik@file"
- "traefik.http.routers.ops-ak.service=ops"
- "traefik.http.routers.ops-ak.tls.certresolver=letsencrypt"
- "traefik.http.routers.ops-ak.priority=250"
# Service
- "traefik.http.services.ops.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
networks:
proxy:
external: true