generated from yuiseki/next-benri-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 896 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
version: '3.9'
services:
node:
image: node:20.15.0-alpine
ports:
- 3000:3000
environment:
- NODE_ENV=development
- MONGODB_URI=mongodb://mongo:27017/
- MONGODB_DB=crisis-news-development
- MONGODB_USER=root
- MONGODB_PASS=password
working_dir: /app
volumes:
- ./:/app
command: sh -c "npm ci && npm run dev"
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- mongo_volume:/data/db
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
depends_on:
- mongo
volumes:
mongo_volume: