From 8f95ffb13be709036916d604849f8fde7e777a8f Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 17 Aug 2026 11:33:06 +0200 Subject: deploy via docker registry --- README.md | 21 +++++++++++++++------ mise.toml | 7 ++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 98c3ed3..0916549 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/mise.toml b/mise.toml index 58c7907..deaa202 100644 --- a/mise.toml +++ b/mise.toml @@ -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" """ -- cgit v1.3