version: '3.4'

services:
  oc-workflow:
    environment: 
      - _OCWORKFLOW_MONGO_DATABASE=DC_myDC
      - _OCWORKFLOW_MONGO_URL=mongodb://mongo:27017
      - _OCWORKFLOW_NATS_URL=nats://nats:4222
    image: 'oc-workflow:latest'
    ports:
      - 8088:8080
    container_name: oc-workflow
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.workflow.entrypoints=web"
        - "traefik.http.middlewares.auth.forwardauth.address=http://oc-auth:8080/oc/forward"
        - "traefik.http.routers.workflow.rule=PathPrefix(/workflow)"
        - "traefik.http.routers.workflow.tls=false"
        - "traefik.http.routers.workflow.middlewares=auth"
    networks: 
      - catalog

networks: 
  catalog:
    external: true