-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
55 lines (52 loc) · 1.22 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
version: "3"
services:
mongodb:
image: mongo:6.0
container_name: dca_db
volumes:
- ./mongo/data:/data/db
- ./mongo/entrypoint:/docker-entrypoint-initdb.d/:ro
ports:
- "${DB_PORT}:27017"
env_file:
- .env
hostname: "${DB_HOST}"
restart: always
backend:
container_name: dca_backend
build:
context: ./backend/
dockerfile: Dockerfile.prod
volumes:
- ./backend:/app
- ./certbot/conf/live/:/app/certs/:ro
ports:
- "${BACKEND_PORT}:80"
env_file:
- .env
depends_on:
- mongodb
restart: always
nginx:
container_name: dca_nginx
build:
context: ./nginx/
dockerfile: Dockerfile
volumes:
- ./frontend/dist/:/var/www/
- ./nginx/log/:/var/log/nginx/
- ./certbot/www/:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
ports:
- ${FRONTEND_PORT}:80
- ${FRONTEND_PORT_SSL}:443
env_file:
- .env
restart: always
certbot:
container_name: dca_certbot
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
- ./certbot/log/letsencrypt/:/var/log/letsencrypt/:rw