forked from Gomerce/GomerceBE
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-prod.yml
51 lines (46 loc) · 1023 Bytes
/
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
version: 3.8
services:
app:
container_name: gomerce_app
build:
context: .
dockerfile: Dockerfile
expose:
- 3303
env_file:
- .env
command: gunicorn --bind 0.0.0.0:3303 --workers 4 "run:app"
depends_on:
- db
nginx:
container_name: nginx
image: nginx:latest
restart: always
ports:
- 80:80
- 443:433
depends_on:
- app
volumes:
- ./nginx/conf/:/etc/nginx/conf.d/:ro
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
db:
image: postgres:14
container_name: postgres_db
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: