-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
61 lines (56 loc) · 1.12 KB
/
docker-compose.prod.yml
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
services:
api:
build:
context: ./api
dockerfile: Dockerfile
image: blogapi-api:1.0
expose:
- "8000"
entrypoint: ./entrypoint-api.sh
env_file: .env.prod
volumes:
- staticfiles:/staticfiles
depends_on:
- postgres-db
redis:
image: redis:7.2.4-alpine
command: redis-server
expose:
- "6379"
postgres-db:
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file: .env.prod
expose:
- "5432"
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "80:80"
- "443:443"
env_file: .env.prod
volumes:
- staticfiles:/staticfiles
- certbot_certs:/etc/letsencrypt
- certbot_web:/var/www/certbot
depends_on:
- api
certbot:
build:
context: ./certbot
dockerfile: Dockerfile
command: echo "Skipping certbot..."
env_file: .env.prod
volumes:
- certbot_certs:/etc/letsencrypt
- certbot_web:/var/www/certbot
depends_on:
- nginx
volumes:
staticfiles:
postgres_data:
certbot_certs:
certbot_web: