aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md21
-rw-r--r--mise.toml7
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"
"""