From 31a1970b7c2a982dac674a9383074fe3a18a0538 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Sat, 25 May 2024 20:52:51 -0400 Subject: [PATCH] more deploy work --- .containerignore | 1 + .zsignore | 6 +++-- Containerfile | 6 +++++ docker-compose.yaml => compose.yaml | 4 +++- readme.md | 36 +++++++++++++++++++++-------- 5 files changed, 41 insertions(+), 12 deletions(-) create mode 120000 .containerignore create mode 100644 Containerfile rename docker-compose.yaml => compose.yaml (71%) diff --git a/.containerignore b/.containerignore new file mode 120000 index 0000000..9a73a6b --- /dev/null +++ b/.containerignore @@ -0,0 +1 @@ +.zsignore \ No newline at end of file diff --git a/.zsignore b/.zsignore index 5d9c0c5..811950d 100644 --- a/.zsignore +++ b/.zsignore @@ -1,6 +1,8 @@ -docker-compose.yaml +Containerfile +compose.yaml readme.md -build data backing-up rss +hooks +hooks diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..fb9aab2 --- /dev/null +++ b/Containerfile @@ -0,0 +1,6 @@ +FROM prologic/zs AS build +COPY . . +RUN zs build --production + +FROM caddy/caddy:2.8-alpine +COPY --from=build /data/.pub:/usr/share/caddy diff --git a/docker-compose.yaml b/compose.yaml similarity index 71% rename from docker-compose.yaml rename to compose.yaml index 42640f4..d54166a 100644 --- a/docker-compose.yaml +++ b/compose.yaml @@ -1,6 +1,8 @@ services: jonathan.is: - image: caddy:2.8-alpine + build: + context: . + dockerfile: Containerfile restart: unless-stopped ports: - "8081:80" diff --git a/readme.md b/readme.md index f788f26..f2c223b 100644 --- a/readme.md +++ b/readme.md @@ -1,19 +1,37 @@ -https://jonathan.is +# https://jonathan.is -# todo +## quickstart -## deploy -- [x] push to git -- [ ] create dockerfile for building -- [x] create docker-compose for serving -- [ ] forgejo post-receive hook -> docker build + $ ssh server "git clone --bare https://git.woodbine.nyc/micro/jonathan.is.git" + $ ssh server "cd jonathan.is.git && git show HEAD:hooks/post-receive > hooks/post-receive" + $ git remote add server ssh://server/~jonathan.is.git + $ git push server + +## manual install + +build + + podman build . --tag jonathan.is + +run + + podman compose up + +deploy + + git push server + +## todo + +### deploy +- [ ] forgejo (or git?) post-receive hook -> docker build - [ ] proxy nginx on digitalocean - [ ] setup beta.jonathan.is dns to digitalocena -## features +### features - [ ] generate rss feed -## usability +### usability - [ ] test in chrome - [ ] redirect jedahan.com - [ ] redirect jonathan.is