-
Notifications
You must be signed in to change notification settings - Fork 536
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 946 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
version: '3.9'
services:
mongodb:
container_name: blog-mongodb
image: mongo:4.2
ports:
- 27017:27017
volumes:
- mongo_data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: blog
MONGO_INITDB_ROOT_PASSWORD: blog
mongo-express:
container_name: blog-mongo-express
image: mongo-express
depends_on:
- mongodb
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_URL: mongodb://blog:blog@blog-mongodb:27017
dev:
container_name: blog-dev
build:
context: .
dockerfile: ./docker/Dockerfile.dev
args:
USER_ID: ${USER_ID:-1000}
GROUP_ID: ${GROUP_ID:-1000}
depends_on:
- mongodb
network_mode: host
environment:
- NODE_ENV=${NODE_ENV:-development}
volumes:
- .:/opt/node-app
- npm_cache:/home/node/.npm-packages
tty: true
profiles:
- dev
volumes:
npm_cache:
mongo_data: