Skip to content

Commit d2e6bc8

Browse files
committed
PEER-252 Validation checks passed
1 parent 88460d8 commit d2e6bc8

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

docker-compose.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
# Databases
55
user-db:
66
hostname: 'user-db'
7-
image: postgres:16.4
7+
image: 'postgres:16.4'
88
container_name: 'user-db'
99
build:
1010
context: ./backend/user/src/lib/db
@@ -55,8 +55,6 @@ services:
5555
restart: unless-stopped
5656
networks:
5757
- question-db-network
58-
ports:
59-
- 5433:5432
6058
healthcheck:
6159
test: ['CMD-SHELL', 'pg_isready -U peerprep-qn-express -d question']
6260
interval: 10s
@@ -75,8 +73,6 @@ services:
7573
args:
7674
# For building with the correct env vars
7775
- port=${USER_EXPRESS_PORT}
78-
ports:
79-
- '9001:${USER_EXPRESS_PORT}'
8076
env_file:
8177
- ./backend/user/.env.compose
8278
environment:
@@ -91,24 +87,22 @@ services:
9187
- user-db-network
9288
- user-api-network
9389
healthcheck:
94-
test: wget --no-verbose --tries=1 --spider http://localhost:9001/health || exit 1
90+
test: wget --no-verbose --tries=1 --spider http://localhost:${USER_EXPRESS_PORT}/health || exit 1
9591
interval: 30s
9692
timeout: 10s
9793
retries: 5
9894
start_period: 5s
9995

10096
question-service:
10197
image: "question-express"
102-
container_name: "question-express"
98+
container_name: '${QUESTION_SERVICE_NAME}'
10399
build:
104100
context: ./backend/question
105101
dockerfile: express.Dockerfile
106102
target: production
107103
args:
108104
# For building with the correct env vars
109105
- port=${QUESTION_EXPRESS_PORT}
110-
ports:
111-
- "9002:${QUESTION_EXPRESS_PORT}"
112106
env_file:
113107
- ./backend/question/.env.compose
114108
environment:
@@ -123,7 +117,7 @@ services:
123117
- question-db-network
124118
- question-api-network
125119
healthcheck:
126-
test: wget --no-verbose --tries=1 --spider http://localhost:9002/health || exit 1
120+
test: wget --no-verbose --tries=1 --spider http://localhost:${QUESTION_EXPRESS_PORT}/health || exit 1
127121
interval: 30s
128122
timeout: 10s
129123
retries: 5
@@ -145,13 +139,15 @@ services:
145139
- ./frontend/.env.compose
146140
environment:
147141
- VITE_USER_SERVICE=http://${USER_SERVICE_NAME}:${USER_EXPRESS_PORT}
148-
##to remove localhost once integrating question
149-
- VITE_QUESTION_SERVICE=http://host.docker.internal:${QUESTION_EXPRESS_PORT}
142+
- VITE_QUESTION_SERVICE=http://${QUESTION_SERVICE_NAME}:${QUESTION_EXPRESS_PORT}
150143
- FRONTEND_PORT=${FRONTEND_PORT}
151144
depends_on:
152145
user-service:
153146
condition: service_healthy
154147
restart: true
148+
question-service:
149+
condition: service_healthy
150+
restart: true
155151
networks:
156152
- user-api-network
157153
- question-api-network

0 commit comments

Comments
 (0)