Use neocities for hosting

main
Jonathan Dahan 11 months ago
parent fdeced6a8d
commit 282cbf35c5

@ -5,4 +5,4 @@ data
backing-up
rss
hooks
hooks
production.env

@ -2,5 +2,9 @@ FROM docker.io/prologic/zs AS build
COPY . .
RUN zs build --production
FROM docker.io/ruby:alpine AS deploy
RUN gem install neocities
COPY --from=build /data/.pub /pub
FROM docker.io/caddy/caddy:2.8-alpine
COPY --from=build /data /usr/share/caddy
COPY --from=build /data /srv

@ -1,12 +1,31 @@
services:
jonathan.is:
image: jonathan.is
pull_policy: never
build:
context: .
dockerfile: Containerfile
restart: unless-stopped
ports:
- "8081:80"
- "8443:443"
- "8443:443/udp"
volumes:
- ./.pub:/usr/share/caddy
- ./data:/data
- caddy_data:/data
- caddy_config:/config
deploy:
profiles: [ deploy ]
image: localhost/jonathan.is:deploy
pull_policy: never
env_file:
- production.env
build:
context: .
dockerfile: Containerfile
target: deploy
command: "neocities push --prune /pub"
volumes:
caddy_data:
external: true
caddy_config:

@ -2,34 +2,21 @@
## quickstart
$ 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 && chmod +x hooks/post-receive"
$ git remote add server ssh://server/~jonathan.is.git
$ git push server
## manual install
build
podman build . --tag jonathan.is
podman compose build
run
podman compose up
deploy
git push server
podman compose --profile deploy up deploy
## todo
### deploy
- [ ] git post-receive hook -> reload server
- [ ] proxy caddy behind nginx on digitalocean
- [ ] setup beta.jonathan.is dns to digitalocean
- [ ] git pre-receive hook -> update post-receive hook
### features
- [ ] generate rss feed

Loading…
Cancel
Save