Skip to content

Commit deda708

Browse files
committed
feat: add docker compose
1 parent 44640fd commit deda708

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docker-compose.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: '3.9'
2+
3+
services:
4+
mongodb:
5+
image: 'mongo'
6+
volumes:
7+
- data:/data/db
8+
environment:
9+
MONGO_INITDB_ROOT_USERNAME: mongoadmin
10+
MONGO_INITDB_ROOT_PASSWORD: secret
11+
12+
server:
13+
build: .
14+
ports:
15+
- 3001:3001
16+
volumes:
17+
- .:/app
18+
- uploads:/app/public/uploads
19+
- /app/node_modules
20+
env_file:
21+
- ./config/.env
22+
depends_on:
23+
- mongodb
24+
25+
mongo-express:
26+
image: mongo-express
27+
restart: always
28+
ports:
29+
- 8001:8081
30+
environment:
31+
ME_CONFIG_MONGODB_ADMINUSERNAME: mongoadmin
32+
ME_CONFIG_MONGODB_ADMINPASSWORD: secret
33+
ME_CONFIG_MONGODB_URL: mongodb://mongoadmin:secret@mongodb:27017/
34+
35+
volumes:
36+
uploads:
37+
data:

0 commit comments

Comments
 (0)