-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.compose.yaml
More file actions
36 lines (32 loc) · 935 Bytes
/
dev.compose.yaml
File metadata and controls
36 lines (32 loc) · 935 Bytes
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
# Define all services (containers)
services:
# MongoDB service
mongodb:
# Use official mongoDB image
image: mongo:latest
# Always restart unless forcibly stop the process.
restart: unless-stopped
ports:
- "27017:27017"
# Create volume within src directory
volumes:
- ./database/mongodb-data:/data/db
# Backend service
expressjs:
# Build the docker image from the dockerfile in the current dir
build:
dockerfile: Dockerfile.dev
# Map port 8000 inside the container to port 8000 on the host machine
ports:
- "8000:8000"
# Load env variables from the .env file
env_file:
- .env
# Override environment variable to indicate containerized environment
environment:
- IS_DOCKERIZED=true
# Wait for mongo servvice to start
depends_on:
- mongodb
# Override the default command and run npm start
command: pnpm start