-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (54 loc) · 1.24 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
version: "3.8"
services:
genres_service:
container_name: genres_service
image: genres_service_template
restart: always
build:
context: ./genres
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- DEBUG=true
- API_URL=http://localhost
- API_PORT=3000
- DB_MONGO_URL=mongodb://mongo:27017 #this string is different form .env file
depends_on:
- mongo
networks:
- node-network
movie_service:
container_name: movie_service
image: movie_service_template
restart: always
build:
context: ./movie
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- NODE_ENV=development
- DEBUG=true
- API_URL=http://localhost
- API_PORT=3001
- DB_MONGO_URL=mongodb://mongo:27017 #this string is different form .env file
depends_on:
- mongo
networks:
- node-network
mongo:
image: mongo:6.0
restart: always
environment:
MONGO_INITDB_DATABASE: challenge_db
MONGO_INITDB_ROOT_USERNAME:
MONGO_INITDB_ROOT_PASSWORD:
volumes:
- ./db-data/:/data/db
networks:
- node-network
networks:
node-network:
driver: bridge