-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
83 lines (77 loc) · 1.62 KB
/
docker-compose.prod.yml
File metadata and controls
83 lines (77 loc) · 1.62 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
version: "3.8"
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: next_frontend
environment:
- NODE_ENV=production
expose:
- "3000"
networks:
- app_network
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: fastapi_backend
ports:
- "8000:8000"
environment:
- PYTHONUNBUFFERED=1
working_dir: /app/app
command: uvicorn main:app --host 0.0.0.0 --port 8000
volumes:
- ./backend:/app
networks:
- app_network
restart: unless-stopped
depends_on:
- redis
redis:
image: redis:8-alpine
ports:
- "6379:6379"
container_name: redis
networks:
- app_network
restart: unless-stopped
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx_proxy
ports:
- "80:80"
- "443:443"
environment:
- NGINX_DOMAIN=jenison.ru
volumes:
- ./nginx/certs/conf:/etc/letsencrypt
- ./nginx/certs/www:/var/www/certbot
depends_on:
- frontend
- backend
networks:
- app_network
restart: unless-stopped
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./nginx/certs/conf:/etc/letsencrypt
- ./nginx/certs/www:/var/www/certbot
entrypoint: >
/bin/sh -c "trap exit TERM; while :; do
certbot renew --webroot -w /var/www/certbot;
sleep 12h;
done"
depends_on:
- nginx
networks:
- app_network
networks:
app_network:
driver: bridge