TAG
Tag: Docker
5 articles tagged Docker.
- VPS
Where to put apps on a VPS: the /opt/apps directory layout
A simple convention for app code on a VPS: keep each app in its own folder under /opt/apps, chown the parent folder once, and git clone, git pull and .env edits never need sudo again.
- VPS
Automatic maintenance page with Caddy during Docker deploys
Use Caddy's handle_errors to catch the 502 Bad Gateway that appears while a container rebuilds and serve a static maintenance page automatically, with no manual on/off switch.
- Dev tools
Roll back a Git commit and update safely on a VPS
Take your project back to an older commit, force push to the remote, then reset the VPS to match without a merge conflict, then rebuild the service and clear caches.
- VPS
Set up Caddy as a reverse proxy on a VPS with Docker
Run Caddy as a Dockerized reverse proxy on a fresh VPS: create a shared network, write the Caddyfile and docker-compose file, get HTTPS automatically, then add new domains with a single zero-downtime reload.
- Database
Fix Docker containers that cannot reach PostgreSQL on a VPS
Docker picks a new network range every time you run docker-compose down and up, so PostgreSQL on the host rejects the container. Diagnose the subnet, open UFW and pg_hba.conf, then allow the whole 172.16.0.0/12 range to fix it once.