0

I would like to enable mirror for specific containers from docker-compose. On the docker-gen template I have the follow:

    {{ $mirror := or (first (groupByKeys $containers "Env.MIRROR")) (or $.Env.MIRROR "enable") (or $.Env.MIRROR "disable") }}

    location / {
        {{ if eq $mirror "enable" }}
        mirror /mirror;                                        
        mirror_request_body on;
        {{ end }}

I always get mirror set to enable.

  backend:
    container_name: backend
    build:
      context: ../backend/src
      dockerfile: prod.Dockerfile
    volumes:
      - ../backend/src/:/usr/src/app/:delegated
    logging:
      driver: "json-file"
      options:
        max-file: "50"
        max-size: "10m"
    ulimits:
      core: 0
    environment:
      - VIRTUAL_HOST=cloud.server.io
      - VIRTUAL_PORT=8000
      - HTTPS_METHOD=redirect
      - MIRROR=disable

Where is the error?

metRo_
  • 445
  • 1
  • 7
  • 18

0 Answers0