From e5b7d83610fd7b2447911ec768105bc35f5a5e4d Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 12 Nov 2023 00:32:23 +0100 Subject: [PATCH] fixed the webclient not emmerging because in prod the services are named differently --- docker-compose.yml | 13 ++++++++++++- webclient/Dockerfile | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 43255936e..9df89ec8a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,10 +7,21 @@ services: - "3000:3000" environment: TILESERVER_URL: http://tilserver:3001 - CDN_URL: http://cdn:3002 + CDN_URL: http://data:3002 MAIN_API_URL: http://main-api:3003 FEEDBACK_API_URL: http://feedback-api:3004 CALENDAR_API_URL: http://calendar-api:3005 + depends_on: + tileserver: + condition: service_healthy + data: + condition: service_healthy + main-api: + condition: service_healthy + feedback-api: + condition: service_healthy + calendar-api: + condition: service_healthy # maps tileserver-init-sprites: image: alpine:latest diff --git a/webclient/Dockerfile b/webclient/Dockerfile index 027cf9905..cba485f38 100644 --- a/webclient/Dockerfile +++ b/webclient/Dockerfile @@ -25,4 +25,4 @@ COPY --from=build-stage /dist /app EXPOSE 3000 HEALTHCHECK CMD curl --fail localhost:3000/health || exit 1 -CMD sh -c "sed -i 's|TILESERVER_URL|${TILESERVER_URL}|g' /etc/nginx/nginx.conf && sed -i 's|CDN_URL|${CDN_URL}|g' /etc/nginx/nginx.conf && sed -i 's|MAIN_API_URL|${MAIN_API_URL}|g' /etc/nginx/nginx.conf && sed -i 's|FEEDBACK_API_URL|${FEEDBACK_API_URL}|g' /etc/nginx/nginx.conf && sed -i 's|CALENDAR_API_URL|${CALENDAR_API_URL}|g' /etc/nginx/nginx.conf && cat /etc/nginx/nginx.conf && nginx -g daemon off;"] +CMD sh -c "sed -i 's|TILESERVER_URL|${TILESERVER_URL}|g' /etc/nginx/nginx.conf && sed -i 's|CDN_URL|${CDN_URL}|g' /etc/nginx/nginx.conf && sed -i 's|MAIN_API_URL|${MAIN_API_URL}|g' /etc/nginx/nginx.conf && sed -i 's|FEEDBACK_API_URL|${FEEDBACK_API_URL}|g' /etc/nginx/nginx.conf && sed -i 's|CALENDAR_API_URL|${CALENDAR_API_URL}|g' /etc/nginx/nginx.conf && cat /etc/nginx/nginx.conf && nginx -g 'daemon off;'"