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

47 lines
977 B
Plaintext
Raw Normal View History

2021-05-18 15:10:08 +02:00
version: '3.6'
services:
pep:
image: nginx:stable-alpine
networks:
- {{ conductor_network }}
2021-05-18 15:10:08 +02:00
ports:
- "{{ pep_port }}:80"
deploy:
2021-05-20 18:02:07 +02:00
replicas: {{ pep_replicas }}
{% if infrastructure != 'local' %}
placement:
constraints: [node.role != worker]
{% endif %}
2021-05-18 15:10:08 +02:00
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
2021-05-20 18:58:23 +02:00
{% if pep is defined and pep == True %}
- source: pep
target: /etc/nginx/pep.js
- source: pepconfig
target: /etc/nginx/config.js
{% endif %}
2021-05-18 15:10:08 +02:00
networks:
{{ conductor_network }}:
2021-05-18 15:10:08 +02:00
configs:
nginxconf:
file: ./nginx.default.conf
nginxbaseconf:
file: ./nginx.conf
2021-05-20 18:58:23 +02:00
{% if pep is defined and pep == True %}
pep:
file: ./pep.js
pepconfig:
file: ./config.js
{% endif %}