-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 986 Bytes
/
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
version: '3.7'
services:
nodejs:
build:
context: .
dockerfile: Dockerfile
image: nodejs
container_name: gda_nodejs
restart: on-failure
env_file: .env
environment:
- DB_USERNAME=$DB_USERNAME
- DB_PASSWORD=$DB_PASSWORD
- DB_HOST=db
- DB_PORT=$DB_PORT
- DB_NAME=$DB_NAME
- SMTP_HOST=$SMTP_HOST
- SMTP_PORT=$SMTP_PORT
- SMTP_USER=$SMTP_USER
- SMTP_PASS=$SMTP_PASS
ports:
- "8080:3000"
volumes:
- .:/app
#- node_modules:/app/node_modules
networks:
- app-network
command: npm run $RUN_MODE
db:
image: mongo:5.0.5
container_name: gda_db
restart: unless-stopped
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=$DB_USERNAME
- MONGO_INITDB_ROOT_PASSWORD=$DB_PASSWORD
volumes:
- dbdata:/data/db
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
dbdata:
node_modules: