-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
86 lines (79 loc) · 2.17 KB
/
docker-compose-prod.yml
File metadata and controls
86 lines (79 loc) · 2.17 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
version: "3.8"
services:
nginx:
image: nginx:alpine
container_name: racecar-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certbot/conf:/etc/letsencrypt:ro
- ./nginx/certbot/www:/var/www/certbot:ro
depends_on:
- frontend
- backend
- auth
restart: unless-stopped
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
container_name: racecar-certbot
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
grafana:
image: grafana/grafana:latest
container_name: racecar-grafana
expose:
- "3000"
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: racecar-backend
expose:
- "8000"
environment:
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
- INFLUX_ORG=${INFLUX_ORG}
- INFLUX_URL=${INFLUX_URL}
- INFLUX_BUCKET=${INFLUX_BUCKET}
- SECRET_KEY=${SECRET_KEY:-test}
restart: unless-stopped
command: uvicorn server:app --host 0.0.0.0 --port 8000
auth:
build: ./backend/auth
container_name: racecar-auth
expose:
- "8001"
volumes:
- ./backend/auth/data:/app/data
environment:
- SECRET_KEY=${SECRET_KEY:-test}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-test}
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: racecar-frontend
expose:
- "80"
depends_on:
- backend
- auth
restart: unless-stopped
volumes:
grafana-storage: