-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-production.yml
58 lines (54 loc) · 1.12 KB
/
docker-compose-production.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
version: "3.7"
services:
client:
container_name: mern-client-production
image: mern-client-production:${ENV}
ports:
- 80:80
- 443:443
networks:
- mern-network
depends_on:
- server
restart: unless-stopped
volumes:
- caddy-data:/data
- caddy-config:/config
server:
container_name: mern-api
image: mern-api
env_file:
- ./server/config/${ENV}.env
ports:
- 5000:3000
networks:
- mern-network
depends_on:
- db
command: /usr/app/node_modules/.bin/nodemon -L server.js
restart: unless-stopped
db:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
ports:
- 27017:27017
volumes:
- mongo-data:/data/db
networks:
- mern-network
restart: unless-stopped
container_name: mern-db-production
networks:
mern-network:
driver: bridge
volumes:
mongo-data:
driver: local
caddy-data:
driver: local
caddy-config:
driver: local
portainer-data:
driver: local