Compare commits

2 Commits

Author SHA1 Message Date
Ichitux 271d23b072 Merge pull request 'feat: add healthchecks to all docker compose services' (#58) from feat/docker-healthchecks into main
Build & Push Docker Images / Backend Tests (push) Has been skipped
Build & Push Docker Images / Parapharmacy API Tests (push) Has been skipped
Build & Push Docker Images / Build Parapharmacy API (push) Has been skipped
Build & Push Docker Images / Build Pip Platform (push) Has been skipped
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Detect Changes (push) Successful in 10s
Build & Push Docker Images / Pip Platform Tests (push) Has been skipped
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
Reviewed-on: #58
2026-07-27 13:23:59 +00:00
Antoni Nuñez Romeu 258839dfc8 feat: add healthchecks to all docker compose services
Run Tests on Branches / Detect Changes (push) Successful in 13s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
2026-07-27 15:23:16 +02:00
+33
View File
@@ -2,6 +2,11 @@ services:
redis:
image: redis:alpine
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- internal
@@ -28,6 +33,12 @@ services:
context: .
dockerfile: apps/backend/Dockerfile
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/healthz', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) })"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
env_file:
- ./apps/backend/.env
environment:
@@ -68,6 +79,12 @@ services:
VITE_FARO_ENV: ${VITE_FARO_ENV:-production}
VITE_FARO_APP_VERSION: ${VITE_FARO_APP_VERSION:-1.0.0}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:80/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
ports:
- "4000:80"
depends_on:
@@ -80,6 +97,11 @@ services:
redis-exporter:
image: oliver006/redis_exporter:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:9121/metrics"]
interval: 15s
timeout: 5s
retries: 3
environment:
REDIS_ADDR: redis://redis:6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
@@ -91,6 +113,11 @@ services:
postgres-exporter:
image: prometheuscommunity/postgres-exporter:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:9187/metrics"]
interval: 15s
timeout: 5s
retries: 3
environment:
DATA_SOURCE_NAME: postgresql://farmafinder:${PG_PASSWORD:?PG_PASSWORD must be set}@postgres:5432/farmafinder?sslmode=disable
depends_on:
@@ -129,6 +156,12 @@ services:
mongodb:
image: mongo:7
restart: unless-stopped
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
- mongodb_data:/data/db
networks: