-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (113 loc) · 2.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
118 lines (113 loc) · 2.68 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
x-keycast-build: &keycast-build
context: .
args:
KEYCAST_UID: ${KEYCAST_UID:-10001}
KEYCAST_GID: ${KEYCAST_GID:-10001}
x-keycast-hardening: &keycast-hardening
user: "${KEYCAST_UID:-10001}:${KEYCAST_GID:-10001}"
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
services:
keycast-api:
<<: *keycast-hardening
container_name: keycast-api
build: *keycast-build
command: api
expose:
- "3000"
volumes:
- ./database:/app/database:rw
- ./master.key:/app/master.key:ro
environment:
- "ALLOWED_PUBKEYS=${ALLOWED_PUBKEYS:?error}"
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "api"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- keycast
labels:
- "caddy=${DOMAIN:?error}"
- "caddy.reverse_proxy=/api/* {{upstreams 3000}}"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
compress: "true"
keycast-web:
<<: *keycast-hardening
container_name: keycast-web
build:
<<: *keycast-build
args:
KEYCAST_UID: ${KEYCAST_UID:-10001}
KEYCAST_GID: ${KEYCAST_GID:-10001}
command: web
expose:
- "5173"
depends_on:
keycast-api:
condition: service_healthy
environment:
- NODE_ENV=production
- WAIT_FOR_API=true
- HOST=0.0.0.0
- PORT=5173
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "web"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- keycast
labels:
- "caddy=${DOMAIN:?error}"
- "caddy.reverse_proxy=/* {{upstreams 5173}}"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
compress: "true"
keycast-signer:
<<: *keycast-hardening
container_name: keycast-signer
build: *keycast-build
command: signer
volumes:
- ./database:/app/database:rw
- ./signer/config.toml:/app/signer/config.toml:ro
- ./master.key:/app/master.key:ro
environment:
- RUST_LOG=info,keycast_signer=info
- MASTER_KEY_PATH=/app/master.key
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "signer"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- keycast
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
compress: "true"
networks:
keycast:
external: true
name: keycast