Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.59 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
services:
backend:
image: fastread-api:local
build:
context: .
dockerfile: backend-go/Dockerfile
command: ["serve", "--listen", "0.0.0.0:8483"]
environment: &runtime
FASTREAD_WEB_ROOT: /var/lib/fastread/web
FASTREAD_DATA_ROOT: /var/lib/fastread/config
FASTREAD_COOKIE_SECURE: ${FASTREAD_COOKIE_SECURE:-false}
FASTREAD_PUBLIC_ORIGIN: ${FASTREAD_PUBLIC_ORIGIN:-http://127.0.0.1:3015}
FASTREAD_FASTNEWS_URL: ${FASTREAD_FASTNEWS_URL:-https://news.fastrd.io}
FASTREAD_FASTWRITE_URL: ${FASTREAD_FASTWRITE_URL:-https://write.fastrd.io}
volumes:
- fastread-data:/var/lib/fastread
expose: ["8483"]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8483/api/health"]
interval: 10s
timeout: 5s
retries: 6
worker:
image: fastread-api:local
command: ["worker", "--concurrency", "2"]
environment: *runtime
volumes:
- fastread-data:/var/lib/fastread
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
frontend:
build:
context: .
dockerfile: fastread-frontend/Dockerfile
expose: ["80"]
restart: unless-stopped
nginx:
image: nginx:1.27-alpine
ports:
- "127.0.0.1:${APP_PORT:-3015}:80"
environment:
BACKEND_PORT: "8483"
volumes:
- ./nginx/default.conf:/etc/nginx/templates/default.conf.template:ro
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_started
restart: unless-stopped
volumes:
fastread-data: