diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-17 11:33:06 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-17 11:33:06 +0200 |
| commit | 8f95ffb13be709036916d604849f8fde7e777a8f (patch) | |
| tree | 69dd525c3e585a549656d6f6de462b81aec1e14f | |
| parent | bbb9f770573b78b3636ad3c802eb4f442d9695bc (diff) | |
deploy via docker registry
| -rw-r--r-- | README.md | 21 | ||||
| -rw-r--r-- | mise.toml | 7 |
2 files changed, 19 insertions, 9 deletions
@@ -73,13 +73,22 @@ worker precaches assets; works offline after first visit. ## Deploy -- [ ] Deploy bare build + node systemctl service +Images are published to the private registry at +`container.registry.kagamino.dev`. The app password is supplied at runtime as +`AUTH_PASSWORD` in the VPS Docker Compose deployment. -The app password is supplied at runtime as `AUTH_PASSWORD` in the VPS Docker -Compose deployment. +Authenticate both Docker clients once: ```bash -docker build -t home-sveltekit . -docker save home-sveltekit | gzip | pv | ssh ubuntu@feed.kagamino.dev "gunzip | sudo docker load" -ssh ubuntu@feed.kagamino.dev "sudo docker compose up -d home" +docker login container.registry.kagamino.dev +ssh ubuntu@feed.kagamino.dev "sudo docker login container.registry.kagamino.dev" ``` + +Build, push, and deploy the latest image with: + +```bash +mise run deploy +``` + +The deploy script starts the registry, builds and pushes the image, then pulls +and restarts only the `home` service on the VPS. @@ -1,7 +1,8 @@ [tasks.deploy] description = "Build image, push to remote, and restart container" run = """ -docker build -t home-sveltekit . && \ -docker save home-sveltekit | gzip | pv | ssh ubuntu@feed.kagamino.dev "gunzip | sudo docker load" && \ -ssh ubuntu@feed.kagamino.dev "sudo docker compose up -d home" +ssh ubuntu@feed.kagamino.dev "sudo docker compose up -d registry" && \ +docker build -t container.registry.kagamino.dev/home-sveltekit:latest . && \ +docker push container.registry.kagamino.dev/home-sveltekit:latest && \ +ssh ubuntu@feed.kagamino.dev "sudo docker compose pull home && sudo docker compose up -d home" """ |
