-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswarm-app.yml
More file actions
75 lines (72 loc) · 1.81 KB
/
Copy pathswarm-app.yml
File metadata and controls
75 lines (72 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
networks:
default:
name: {{ env.STACK_NAME }}-hello
attachable: true
external: false
shared:
name: external
external: true
service_specs:
# {% if echo_servers is defined %}
# {% for entry in echo_servers %}
echo-server-{{ entry }}:
image: mendhak/http-https-echo:37
update_config:
order: "start-first"
parallelism: 0
# {% endfor %}
# {% endif %}
nginx:
entrypoint: ["/docker-entrypoint.sh"]
command: ["nginx", "-g", "daemon off;"]
image: {{ env.NGINX_IMAGE_REF }}
container_labels:
org.company.country: england
configs:
/etc/nginx/nginx.conf:
source_file: 'nginx.conf'
/etc/nginx/conf.d/default.conf:
content: |
server {
location {{ env.NGINX_LOCATION }} {
root {{ env.NGINX_FOLDER }};
}
location /status {
default_type application/json;
return 200 '{"status":"success"}';
}
}
env_file: .env
networks:
- default
- shared
replicas: 2
stop_signal: SIGQUIT
stop_grace_period: 10
user: '0'
dir: /etc/nginx
placement:
preferences:
- { spread: node.hostname }
max_replicas_per_node: 2
constraints:
- node.labels.purpose == generic
endpoint_spec:
ports:
- protocol: tcp
published_port: 8080
target_port: 80
publish_mode: ingress
health_check:
test: ["CMD", "true"]
interval: 5000000000 # 5s (nanoseconds)
timeout: 5000000000 # 5s (nanoseconds)
retries: 3
start_period: 5000000000 # 5s (nanoseconds)
start_interval: 1000000000 # 1s (nanoseconds)
mounts:
/etc/nginx/:
source: "web-data"
type: "volume" # "bind|volume"
readonly: true