-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.01 KB
/
docker-compose.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
version: "3"
services:
nginx:
container_name: nginx
ports:
- "81:80"
build:
context: ./nginx/
networks:
- nginx-net
depends_on:
- node-app
node-app:
container_name: node-app
build:
context: ./backend/linuxfest-backend/
args:
NODE_ENV: production
volumes:
- upload-files:/app/uploads
environment:
- NODE_ENV=production
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- PWD=/app
env_file:
- ./backend/linuxfest-backend/.env.dev
networks:
- api-net
- nginx-net
depends_on:
- mongo
command: node ./src/index.js
mongo:
image: mongo:4.4
container_name: mongodb
volumes:
- mongo-db:/data/db
networks:
- api-net
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
volumes:
upload-files:
mongo-db:
networks:
api-net: {}
nginx-net: {}