-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
53 lines (53 loc) · 1.09 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
version: '3'
services:
mongo:
container_name: mongo
restart: always
image: mongo
env_file: .env
environment:
environment:
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_USER}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
volumes:
- ./mongoUser.js:/docker-entrypoint-initdb.d/001_users.js:ro
- ./database/mongoDB:/data/db
ports:
- '27017:27017'
api:
env_file: .env
build:
dockerfile: Dockerfile
context: ./api
links:
- mongo
depends_on:
- mongo
volumes:
- /app/node_modules
- ./api:/app
environment:
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DATABASE=${MONGO_DATABASE}
client:
build:
dockerfile: Dockerfile
context: ./client
depends_on:
- api
volumes:
- /app/node_modules
- ./client:/app
nginx:
restart: always
depends_on:
- mongo
- api
- client
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- '80:80'