diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 88d9b1d..7a15589 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -89,6 +89,20 @@ lost on container recreation). For cert persistence, enable Redis persistence in `docker-entrypoint.sh` or mount a redis AOF/RDB volume. Port 80 is required for HTTP-01 challenges (mapped in the compose). +### Logs + +OpenResty runs in the foreground and the Node app in the background, both +writing to the container's stdout/stderr. nginx access/error logs go to files +(`/var/log/nginx`, on the `proxy-logs` volume), so they do **not** appear in +`docker logs`. + +```bash +docker compose logs -f proxy # app + OpenResty (stdout/stderr) +docker compose exec proxy tail -f /var/log/nginx/error.log # nginx errors +docker compose exec proxy tail -f /var/log/nginx/access.log # nginx access +docker compose logs --tail=200 --since=10m proxy # recent context +``` + --- ## Method 2: Bare metal (Debian/Ubuntu) diff --git a/README.md b/README.md index 7bcfa88..8a763ba 100755 --- a/README.md +++ b/README.md @@ -43,6 +43,27 @@ This installer will: - Configure systemd service - Start the proxy service +## Logs (Docker) + +The all-in-one image runs OpenResty in the foreground and the Node app in the +background, both writing to the container's stdout/stderr. The proxy's nginx +access/error logs go to files (`/var/log/nginx`, on the `proxy-logs` volume), +so they do **not** show up in `docker logs`. + +```bash +# App + OpenResty (stdout/stderr) +docker compose logs -f proxy +# or, by container name: +docker logs -f proxy + +# nginx access / error logs (in-container files, not in docker logs) +docker compose exec proxy tail -f /var/log/nginx/access.log +docker compose exec proxy tail -f /var/log/nginx/error.log + +# Recent context +docker compose logs --tail=200 --since=10m proxy +``` + ## Manual Installation For manual installation or other distributions, see the detailed steps below.