diff --git a/Dockerfile b/Dockerfile index d40968b..913e0d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,6 +85,7 @@ RUN apt-get update && apt-get install -y \ ca-certificates \ poppler-utils \ ocrmypdf \ + curl \ && rm -rf /var/lib/apt/lists/* WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index 630df47..ed2c6b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,7 +72,7 @@ services: condition: service_healthy healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"] + test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"] interval: 30s timeout: 10s retries: 3 diff --git a/docs/deployment.md b/docs/deployment.md index 79462e3..f617458 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -215,12 +215,21 @@ services: ## Health Checks -Add health checks to your Docker configuration: +Add health checks to your Docker configuration. The Readur Docker image includes `curl` for health checking. + +**Important:** The port in the healthcheck URL must match your `SERVER_PORT` or the port specified in `SERVER_ADDRESS`: ```yaml services: readur: + environment: + # If using SERVER_ADDRESS + - SERVER_ADDRESS=0.0.0.0:8000 # Port 8000 + # Or if using SERVER_PORT + # - SERVER_PORT=8000 # Port 8000 + healthcheck: + # Port in URL must match the SERVER_PORT/SERVER_ADDRESS port above test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"] interval: 30s timeout: 10s @@ -228,6 +237,10 @@ services: start_period: 40s ``` +For example, if you change the server to run on port 3000: +- Set `SERVER_PORT=3000` or `SERVER_ADDRESS=0.0.0.0:3000` +- Update healthcheck to: `http://localhost:3000/api/health` + ## Backup Strategy Create an automated backup script: