File tree Expand file tree Collapse file tree 2 files changed +41
-6
lines changed Expand file tree Collapse file tree 2 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,17 @@ QUESTION_EXPRESS_DB_PORT=5433
7
7
COLLAB_PGDATA = " /data/collab-db"
8
8
COLLAB_EXPRESS_DB_PORT = 5434
9
9
10
+ MATCHING_PGDATA = " /data/collab-db"
11
+ MATCHING_EXPRESS_DB_PORT = 5434
12
+
10
13
USER_EXPRESS_ENV = compose
11
14
USER_EXPRESS_PORT = 9001
15
+
16
+ QUESTION_EXPRESS_ENV = compose
17
+ QUESTION_EXPRESS_PORT = 9002
18
+
19
+ COLLAB_EXPRESS_ENV = compose
20
+ COLLAB_EXPRESS_PORT = 9003
21
+
22
+ MATCHING_EXPRESS_ENV = compose
23
+ MATCHING_EXPRESS_PORT = 9003
Original file line number Diff line number Diff line change 1
1
# Command: docker-compose --env-file .env.local up -d
2
2
3
3
services :
4
+ # Databases
5
+
4
6
user-db :
5
7
hostname : " user-db"
6
8
image : postgres:16.4
@@ -15,7 +17,7 @@ services:
15
17
- " ${USER_EXPRESS_DB_PORT}:5432"
16
18
restart : unless-stopped
17
19
networks :
18
- - user-network
20
+ - user-db- network
19
21
20
22
collab-db :
21
23
hostname : " collab-db"
@@ -27,10 +29,11 @@ services:
27
29
- ./backend/collaboration/.env.local
28
30
volumes :
29
31
- " collab-db-docker:/${COLLAB_PGDATA}"
30
- # - ./init.sql:/docker-entrypoint-initdb.d/init.sql
31
32
ports :
32
33
- " ${COLLAB_EXPRESS_DB_PORT}:5432"
33
34
restart : unless-stopped
35
+ networks :
36
+ - collab-db-network
34
37
35
38
question-db :
36
39
hostname : " question-db"
@@ -42,10 +45,13 @@ services:
42
45
- ./backend/question/.env.local
43
46
volumes :
44
47
- " question-db-docker:${QUESTION_PGDATA}"
45
- # - ./init.sql:/docker-entrypoint-initdb.d/init.sql
46
48
ports :
47
49
- " ${QUESTION_EXPRESS_DB_PORT}:5432"
48
50
restart : unless-stopped
51
+ networks :
52
+ - question-db-network
53
+
54
+ # Services
49
55
50
56
user-service :
51
57
image : " user-express"
@@ -71,12 +77,16 @@ services:
71
77
depends_on :
72
78
- user-db
73
79
networks :
74
- - user-network
80
+ - user-db-network
81
+ - user-api-network
75
82
entrypoint : ./entrypoint.sh
76
83
77
84
volumes :
78
85
user-service :
79
-
86
+ question-service :
87
+ collab-service :
88
+
89
+ # Persistent Volumes for Databases
80
90
user-db-docker :
81
91
external : true
82
92
collab-db-docker :
@@ -86,5 +96,18 @@ volumes:
86
96
87
97
88
98
networks :
89
- user-network :
99
+ # Isolated API Server Networks
100
+ user-db-network :
101
+ driver : bridge
102
+ question-db-network :
103
+ driver : bridge
104
+ collab-db-network :
105
+ driver : bridge
106
+
107
+ # View-Controller Networks
108
+ user-api-network :
109
+ driver : bridge
110
+ question-api-network :
111
+ driver : bridge
112
+ collab-api-network :
90
113
driver : bridge
You can’t perform that action at this time.
0 commit comments