-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.example
66 lines (62 loc) · 1.76 KB
/
docker-compose.yml.example
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
55
56
57
58
59
60
61
62
63
64
65
66
version: "3.8"
services:
auth-service:
image: ahmadsaeedgoda/ld_rr:auth-service
env_file: ./src/services/auth/.env
build:
context: ./src/services/auth
ports:
- "3000:3000"
volumes:
- ./src/services/auth:/usr/src/app # Mount the source code directory into the container for hot reload
depends_on:
- auth-postgres
auth-postgres:
image: ahmadsaeedgoda/ld_rr:auth-postgres
environment:
- POSTGRES_HOST=auth-postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=nodejs_habit_tracker_users
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=password
build:
context: ./src/services/auth/src/database
dockerfile: ./Dockerfile.postgres
container_name: auth-postgres
ports:
- "5432:5432"
volumes:
- auth-postgres-data:/var/lib/postgresql/data
habit-service:
image: ahmadsaeedgoda/ld_rr:habit-service
env_file: ./src/services/habits/.env
build:
context: ./src/services/habits
ports:
- "3001:3001"
volumes:
- ./src/services/habits:/usr/src/app # Mount the source code directory into the container for hot reload
depends_on:
- habits-postgres
- auth-service
habits-postgres:
image: ahmadsaeedgoda/ld_rr:habits-postgres
environment:
- POSTGRES_HOST=habits-postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=nodejs_habit_tracker_habits
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=password
build:
context: ./src/services/habits/src/database
dockerfile: ./Dockerfile.postgres
container_name: habits-postgres
ports:
- "5433:5432"
volumes:
- habits-postgres-data:/var/lib/postgresql/data
depends_on:
- auth-postgres
volumes:
auth-postgres-data:
habits-postgres-data: