conductor-setup/roles/pep/templates/pep-swarm-ha_network.yaml.j2

39 lines
811 B
Django/Jinja

version: '3.6'
services:
pep:
image: nginx:stable-alpine
networks:
- conductor-network
- haproxy-public
{% if pep is defined and pep == True %}
volumes:
- "./pep.js:/etc/nginx/pep.js"
- "./config.js:/etc/nginx/config.js"
{% endif %}
deploy:
replicas: 1
placement:
constraints: [node.role == worker]
endpoint_mode: dnsrr
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
networks:
conductor-network:
haproxy-public:
external: true
configs:
nginxconf:
file: ./nginx.default.conf
nginxbaseconf:
file: ./nginx.conf