Web serving and authoring works!

caddy-docker-proxy
Jonathan Dahan 2 years ago
commit f09eb4db94

4
.gitignore vendored

@ -0,0 +1,4 @@
secrets/
data/
.redo
*.tmp

@ -0,0 +1 @@
redo services/web/run

@ -0,0 +1 @@
# backup this entire folder

@ -0,0 +1,23 @@
# community services for woodbine.nyc
Install [redo](https://redo.readthedocs.io)
sudo apt install --yes redo || brew install redo
Build the services you want
redo services/caddy
## beta release
- [*] caddy with landing page of this readme
- [ ] backup
- [ ] zitadel sso
- [ ] bookstack wiki
- [ ] caddy webdav for personal home pages
- [ ] dendrite matrix server
- [ ] gitea instance
## credits
thank you hackerspace.zone

@ -0,0 +1 @@
Do not check in anything in this directory

@ -0,0 +1,3 @@
caddy
xcaddy
.latest_download

@ -0,0 +1,4 @@
redo-ifchange xcaddy
./xcaddy build --output $3 \
--with github.com/mholt/caddy-webdav

@ -0,0 +1,4 @@
caddy is our web server
- it handles SSL certificates for each subdomain
- it handles redirecting from a subdomain to an internal service

@ -0,0 +1,17 @@
ARCH=arm64
OS=mac
# get the latest version
curl --silent https://api.github.com/repos/caddyserver/xcaddy/releases/latest \
| grep browser_download_url \
| cut -d : -f 2,3 \
| tr -d \" \
| grep $ARCH \
| grep $OS \
> .latest_download
redo-ifchange .latest_download
curl --location --silent $(cat .latest_download) \
| tar xf - -O xcaddy > $3
chmod +x $3

@ -0,0 +1,11 @@
localhost
root * ../../data/web
route {
rewrite /dav /dav/
webdav /dav/* {
prefix /dav
}
file_server
}

@ -0,0 +1,7 @@
DIRNAME="$(dirname $0)"
cd "$DIRNAME"
redo-ifchange ../caddy/caddy
touch $3
../caddy/caddy run
Loading…
Cancel
Save