-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.yaml
More file actions
47 lines (44 loc) · 1.08 KB
/
stack.yaml
File metadata and controls
47 lines (44 loc) · 1.08 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
version: "3.7"
services:
app:
image: ghcr.io/cg219/common-game:main
environment:
- APP_DATA=data/database.db
- APP_CREDENTIALS=/run/secrets/cgsecrets
- APP_EXIT_BACKUP=1
- PORT=8080
ports:
- 3007:8080
volumes:
- commongame-data:/app/data
secrets:
- cgsecrets
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/healthcheck"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
deploy:
restart_policy:
condition: on-failure
backup:
image: ghcr.io/cg219/common-game:main
environment:
- APP_DATA=data/database.db
- APP_CREDENTIALS=/run/secrets/cgsecrets
- APP_EXIT_BACKUP=1
- PORT=8081
command: ["/bin/sh", "-c", "while ! wget --spider -q http://commongame_app:8080/health; do sleep 10; done; /app/backup"]
volumes:
- commongame-data:/app/data
secrets:
- cgsecrets
deploy:
restart_policy:
condition: on-failure
secrets:
cgsecrets:
file: secrets.yaml
volumes:
commongame-data: