@@ -71,7 +71,7 @@ Every container listens on 8000 internally; Caddy reaches them by container name## How Deployment Works`quickstart.sh` reads `projects.conf` and generates one bare repo under `/srv/git/<name>.git/` per project with a post-receive hook. Pushing to that remote triggers: `git pull`, `docker compose up --build --detach`, `docker network connect bythewood-edge <name>` (idempotent, since `compose up` recreates the container and drops external attachments), optional `manage.py migrate`, and `docker system prune`. Caddy itself runs as a container under `/srv/docker/caddy/` and is brought up once by `quickstart.sh`; ACME certs and account keys persist at `/srv/data/caddy/` (so they're covered by the daily restic snapshot), and Caddyfile edits get picked up via `docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile`.`quickstart.sh` reads `projects.conf` and generates one bare repo under `/srv/git/<name>.git/` per project with a post-receive hook. Pushing to that remote triggers: `git pull`, `docker compose up --build --detach`, then `docker network connect bythewood-edge <cid>` for every container ID returned by `docker compose ps -q` (resolved that way, not by name, so the attach works regardless of compose service name or `container_name`; idempotent because `compose up` recreates containers and drops external attachments), optional `manage.py migrate`, and `docker system prune`. Caddy itself runs as a container under `/srv/docker/caddy/` and is brought up once by `quickstart.sh`; ACME certs and account keys persist at `/srv/data/caddy/` (so they're covered by the daily restic snapshot), and Caddyfile edits get picked up via `docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile`.## Conventions
modified
hosts/alpine/quickstart.sh
@@ -90,7 +90,12 @@ while read oldrev newrev ref; do cd /srv/docker/${name} git pull docker compose up --build --detach docker network connect bythewood-edge ${name} 2>/dev/null || true # Reattach every container in the project to the shared edge network. # Resolved via \`compose ps\` (not \`${name}\`) so this works regardless # of the compose service name or container_name override. for cid in \$(docker compose ps -q); do docker network connect bythewood-edge "\$cid" 2>/dev/null || true doneHOOK if [ "$has_migrate" = "yes" ]; then
modified
hosts/alpine/srv/caddy/Caddyfile
@@ -52,7 +52,7 @@ blog.bythewood.me { Cache-Control "public, max-age=31536000, immutable" } reverse_proxy blog.bythewood.me:8000 reverse_proxy blog:8000 import common}
@@ -89,7 +89,7 @@ timelite.app, www.timelite.app {#darkfurrow.com { reverse_proxy darkfurrow.com:8000 reverse_proxy darkfurrow:8000 import common}
@@ -104,7 +104,7 @@ www.darkfurrow.com {#isaacbythewood.com { reverse_proxy isaacbythewood.com:8000 reverse_proxy isaacbythewood:8000 import common}