From 107992665d3d8d1512a9fb75698a68c1669f7386 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 12 Aug 2024 13:26:22 +0000 Subject: [PATCH] ci: improve healthchecks, expose nginx - be careful with docker volumes --- compose.yaml | 6 ++++-- dockerfile | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compose.yaml b/compose.yaml index 8c5ce8aa3..42e9e2c1f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -12,7 +12,7 @@ services: redis: condition: service_healthy healthcheck: - test: "wget -qO- http://localhost:3000" + test: "wget -qO- http://app:5000" interval: 5s timeout: 5s retries: 3 @@ -49,13 +49,15 @@ services: nginx: image: nginx:alpine + ports: + - 5000:80 volumes: - ./nginx.conf:/etc/nginx/nginx.conf depends_on: app: condition: service_healthy healthcheck: - test: "wget -qO- http://localhost:80" + test: "wget -qO- http://nginx:80" interval: 5s timeout: 5s retries: 3 diff --git a/dockerfile b/dockerfile index bf6a1497a..cf03f6409 100644 --- a/dockerfile +++ b/dockerfile @@ -12,7 +12,7 @@ RUN npm install RUN npm run build -EXPOSE 3100 +EXPOSE 5000 # Command to run the application CMD ["npm", "run", "start:prod"]