-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.18 KB
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
version: '3.8'
services:
crowdfunding_api:
container_name: crowdfunding_api
image: crowdfunding-api
build:
context: .
target: development
dockerfile: ./Dockerfile
command: npm run start:debug
ports:
- ${API_PORT}:${API_PORT}
env_file:
- ./.env
networks:
- crowdfunding-network
volumes:
- .:/usr/src/app
- ./node_modules:/usr/src/app/node_modules
restart: always
depends_on:
- crowdfunding_database
crowdfunding_database:
image: mongo:5.0.3
container_name: ${MONGO_CONTAINER_NAME}
env_file:
- ./.env
environment:
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
ports:
- ${MONGO_PORT}:${MONGO_PORT}
volumes:
- ./database/data:/data/db
- ./database/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
networks:
- crowdfunding-network
networks:
crowdfunding-network: