-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
50 lines (46 loc) · 961 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: "2.2"
services:
app:
container_name: "${SERVICE_NAME}"
build:
context: .
dockerfile: ./Dockerfile
env_file:
- .env
ports:
- $NODE_LOCAL_PORT:$NODE_DOCKER_PORT
#environment:
# - DB_HOST=mongodb
# - DB_USER=$MONGODB_USER
# - DB_PASSWORD=$MONGODB_PASSWORD
# - DB_NAME=$MONGODB_DATABASE
# - DB_PORT=$MONGODB_DOCKER_PORT
stdin_open: true
tty: true
command: npm start
depends_on:
- mongodb
restart: unless-stopped
volumes:
- ./app-data:/usr/src/app
networks:
- dl-net
mongodb:
image: mongo:latest
env_file:
- .env
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
ports:
- $MONGODB_LOCAL_PORT:27017
volumes:
- ./mong-db-data:/data/db
networks:
- dl-net
# volumes:
# app-data:
# db:
networks:
dl-net:
driver: bridge