chore(docker): add healthcheck to service in docker-compose.yml and update deploy workflow to include docker compose down

This commit is contained in:
vchikalkin 2025-07-21 14:40:09 +03:00
parent ae0e7cc1a7
commit 8b0f93bf23
2 changed files with 6 additions and 0 deletions

View File

@ -98,5 +98,6 @@ jobs:
cd /home/${{ secrets.VPS_USER }}/zapishis && \
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} && \
docker compose pull && \
docker compose down && \
docker compose up -d
"

View File

@ -4,6 +4,11 @@ services:
env_file:
- .env
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 10s
timeout: 3s
retries: 5
# ports:
# - 3000:3000
networks: