version: '3.6' services: pep: image: nginx:stable-alpine networks: - {{ conductor_network }} ports: - "{{ pep_port }}:80" deploy: replicas: {{ pep_replicas }} {% if infrastructure != 'local' %} placement: constraints: [node.role != worker] {% endif %} restart_policy: condition: on-failure delay: 10s window: 120s configs: - source: nginxconf target: /etc/nginx/templates/default.conf.template - source: nginxbaseconf target: /etc/nginx/nginx.conf {% if pep is defined and pep == True %} - source: pep target: /etc/nginx/pep.js - source: pepconfig target: /etc/nginx/config.js {% endif %} networks: {{ conductor_network }}: configs: nginxconf: file: ./nginx.default.conf nginxbaseconf: file: ./nginx.conf {% if pep is defined and pep == True %} pep: file: ./pep.js pepconfig: file: ./config.js {% endif %}