Skip to content

Commit

Permalink
ci: improve healthchecks, expose nginx - be careful with docker volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Aug 12, 2024
1 parent f0b6545 commit 1079926
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 1079926

Please sign in to comment.