version: '3.8' services: traefik: image: traefik:v2.9 command: - --entrypoints.web.address=:80 - --providers.consulcatalog=true - --providers.consulcatalog.endpoint.address=consul:8500 - --api.dashboard=true ports: - "80:80" volumes: - ./traefik/traefik.yml:/etc/traefik/traefik.yml - /var/run/docker.sock:/var/run/docker.sock labels: - "traefik.enable=true" data-service: build: ./services/data-service labels: - "traefik.enable=true" - "traefik.http.routers.data.rule=PathPrefix(`/api/data`)" expose: - "8000" quant-service: build: ./services/quant-service labels: - "traefik.enable=true" - "traefik.http.routers.quant.rule=PathPrefix(`/api/quant`)" expose: - "8001" emotion-service: build: ./services/emotion-service labels: - "traefik.enable=true" - "traefik.http.routers.emotion.rule=PathPrefix(`/api/emotion`)" expose: - "8002" recommend-service: build: ./services/recommend-service labels: - "traefik.enable=true" - "traefik.http.routers.recommend.rule=PathPrefix(`/api/recommend`)" expose: - "8003" user-service: build: ./services/user-service labels: - "traefik.enable=true" - "traefik.http.routers.user.rule=PathPrefix(`/api/user`)" expose: - "8004" frontend: build: ./services/frontend labels: - "traefik.enable=true" - "traefik.http.routers.frontend.rule=PathPrefix(`/`)" expose: - "80" gitea-webhook: build: ./gitea-webhook ports: - "5005:5005" consul: image: consul:1.15 ports: - "8500:8500" # Consul Web UI - "8600:8600/udp" volumes: - ./consul/config:/consul/config command: "consul agent -dev -config-dir=/consul/config"