-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.prod.yml
56 lines (55 loc) · 1.03 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
version: "3.9"
services:
app:
image: app:${TAG}
container_name: app
env_file:
- ./.env
environment:
- NODE_ENV=production
tty: true
volumes:
- attachment-data:/usr/src/app/uploads
depends_on:
- mongodb
networks:
- front-tier
- back-tier
mongodb:
image: mongo:4.4.2
restart: always
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=${DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASS}
- MONGO_INITDB_DATABASE=admin
volumes:
- mongodb-data:/data/db
ports:
- 27017:27017
networks:
- back-tier
web-app:
image: nginx:stable-alpine
container_name: web-app
tty: true
env_file:
- ./.env
environment:
- TZ=Asia/Kabul
depends_on:
- app
networks:
- front-tier
links:
- app
ports:
- 80:80
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
volumes:
mongodb-data:
attachment-data:
networks:
front-tier:
back-tier: