Table of Contents

Netbox - ip.hackeriet.no

Deployment

Update

docker compose build --no-cache
docker compose up -d

Troubleshooting

502 Bad Gateway from ip.hackeriet.no

A 502 from https://ip.hackeriet.no/ means nginx is reachable, but the NetBox upstream is not answering correctly.

On app-01:

cd /root/services/netbox-docker
docker compose ps
docker compose logs --tail=120 netbox postgres redis redis-cache netbox-worker
df -h /storage /var/lib/docker

If the containers are confused after a restart, a full compose stop/start has worked better than restarting selected containers:

cd /root/services/netbox-docker
docker compose down
docker compose up -d

NetBox can take a little while to become healthy after docker compose up -d, especially while Postgres and the NetBox container settle. Do not treat the 502 as final immediately after starting the stack; watch the compose status and retry the service after a short wait.

Useful checks:

docker compose ps
curl -v http://127.0.0.1:8000/
curl -v http://127.0.0.1:8000/api/status/
sudo tail -n 100 /var/log/nginx/error.log

Interpretation: