Troubleshooting

Containers won’t start or show “unhealthy”

cd /opt/server-stack
docker compose ps            # check container status and health
docker compose logs          # check for errors
docker compose down
docker compose up -d         # fresh start

All containers use kill -0 1 healthchecks (checks PID 1 is alive). If a container shows (unhealthy), check its logs. If you change a healthcheck or other compose setting, you must recreate the container — restart alone won’t apply config changes:

docker compose up -d --force-recreate nginx

503 Service Temporarily Unavailable on first load

Usually caused by nginx rate limiting. The service worker (sw.js) fetches multiple assets in parallel on initial page load, which can exceed the burst limit. The current config allows burst=50 to accommodate this. Check if rate limiting is the cause:

docker compose logs nginx --since=5m | grep "limiting requests"

If you see limiting requests entries, the burst limit may need increasing in the nginx config.

SSL certificate renewal failing

docker compose run --rm --entrypoint certbot certbot renew --dry-run

Check that port 80 is open and the ACME challenge path is accessible.

Site shows old content after deploy

Hard refresh (Ctrl+Shift+R) to bypass cache. If the issue is server-side, check the current commit:

docker exec php-fpm bash -c "cd /var/www/html && git log --oneline -1"

If the commit is old, the cron may have failed. Check the auto-pull log:

tail -20 /tmp/autopull.log

Locked out of admin

# Reset a user's login from the command line
docker exec php-fpm php /var/www/html/admin/reset-totp.php <username>

nginx config change not taking effect

The nginx config files are bind-mounted read-only from /opt/server-stack/nginx/. After updating them, nginx needs a restart (not just a reload) because the volume mount caches the file:

sudo docker compose -f /opt/server-stack/docker-compose.yml restart nginx

deploy.sh handles this automatically. If you edit the config manually on the server, restart nginx afterwards. Check for syntax errors with:

sudo docker exec nginx nginx -t

Stale content after push notification tap

The service worker adds a cache-bust ?_t=... timestamp to the URL when a notification is tapped, which forces a fresh network fetch for the HTML page. However, the JSON content loaded by app.js from cdn.nortonshop.net/content/ uses networkFirst, so it should always be fresh for online users. If content still appears stale, bump the service worker VERSION to invalidate the dynamic cache.

Bad deploy — need to rollback

Revert to a previous commit on Codeberg (using git revert or force-pushing an older commit). The cron will pick up the change within 60 seconds. Or manually reset inside the container:

docker exec php-fpm bash -c "cd /var/www/html && git log --oneline -10"   # find the good commit
docker exec php-fpm bash -c "cd /var/www/html && git reset --hard <commit-hash>"
Back to top