-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprod.stack.yml
More file actions
136 lines (113 loc) · 2.81 KB
/
prod.stack.yml
File metadata and controls
136 lines (113 loc) · 2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: "3.8"
services:
redis:
image: "redis:alpine3.12"
deploy:
mode: global
update_config:
order: start-first
restart_policy:
condition: any
delay: 5s
#max_attemps: 3
window: 120s
volumes:
- "/data/redis:/data"
entrypoint: redis-server --appendonly yes
sandbox-worker:
image: "coderoom/sandboxworker:latest"
environment:
RABBITMQ_USERNAME: ${RABBITMQ_USER}
RABBITMQ_PASSWORD: ${RABBITMQ_PASS}
EXECUTABLES_VOLUME: "coderoom_executables"
command: sh -c './wait-for rabbitmq:5672 -- python worker.py'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- executables:/app/sandbox/code/
deploy:
replicas: 3
update_config:
order: start-first
parallelism: 1
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 5s
#max_attemps: 3
window: 120s
stop_grace_period: 1m30s
rabbitmq:
image: "rabbitmq:3-management-alpine"
deploy:
mode: global
update_config:
order: start-first
restart_policy:
condition: any
delay: 5s
#max_attemps: 3
window: 120s
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
nginx:
image: "coderoom/nginx:latest"
ports:
- "80:80"
- "443:443"
secrets:
- api_codetwice.crt
- api_codetwice.key
deploy:
mode: global
update_config:
order: start-first
failure_action: rollback
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 5s
#max_attemps: 3
window: 120s
command: sh -c './wait-for web-api:80 -- nginx'
web-api:
image: "coderoom/web-api:latest"
deploy:
mode: global
update_config:
order: start-first
failure_action: rollback
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 5s
#max_attemps: 3
window: 120s
healthcheck:
test: curl -f http://localhost:80/healthcheck || exit 1
volumes:
- "/data/aspnet:/app/keys/"
environment:
RedisConnection: "redis:6379"
EventBusConnection: "rabbitmq:5672"
EventBusUsername: ${RABBITMQ_USER}
EventBusPassword: ${RABBITMQ_PASS}
DataProtectionKeyDirectory: "/app/keys/"
command: sh -c './wait-for rabbitmq:5672 -- ./wait-for redis:6379 -- ./WebUI'
volumes:
executables:
name: "coderoom_executables"
secrets:
api_codetwice.crt:
external: true
api_codetwice.key:
external: true