-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
31 lines (29 loc) · 856 Bytes
/
docker-compose.yaml
File metadata and controls
31 lines (29 loc) · 856 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
# Here we write our services
services:
amopsserviceimage:
# will build the image using the Dockerfile in the current directory
build:
context: .
ports:
- "9898:9797"
# Anonymous Volumes
# volumes:
# - .:/app:ro
env_file:
- .env
# command: npm run dev
depends_on:
- mongo-db
# Means first in memory mongo-db service will be started then only this service will be started
# This is useful when we have multiple services and one service depends on another service
# Remove common for dev and prod bot
mongo-db:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
# Named Volume to store the data. This volume will persist even if the container is removed
volumes:
- mongo-vol:/data/db
volumes:
mongo-vol: