Require Gitea login to write GPX data; IPv6-capable bind
CI / check (push) Successful in 6m28s
CI / deploy (push) Successful in 13s

Upload/delete/move/create-folder now require logging in via Gitea
OAuth2 (only MAPTOOL_ALLOWED_GITEA_USER is granted write access);
reading stays public. Deploy secrets (session secret, OAuth2 client
credentials, allowed user) are written to .env from Gitea Actions
repo secrets on every deploy instead of living on the server by hand.

Also switch the container's bind address to "[::]" (dual-stack) so
the app is reachable over IPv6, not just IPv4.
This commit is contained in:
randy committed 2026-08-27 18:02:37 +02:00
1 parent ae67cc72c7
commit e13d1a1e97
13 files changed
+261 -11

No files matched your search

+23 -3
View File
@@ -52,9 +52,11 @@ jobs:
git checkout -q FETCH_HEAD
# Clears out everything in the target except data/ (uploaded GPX
# files, offline.pmtiles — never part of the git checkout in the
# first place, since it's gitignored) and copies the fresh checkout
# over, dropping .git afterwards.
# files, offline.pmtiles) and copies the fresh checkout over, dropping
# .git afterwards. Dotfiles like .env (deployment secrets) are left
# alone too — the glob below doesn't match them — and neither is ever
# part of the git checkout in the first place, since both are
# gitignored.
- name: Sync to /srv/docker/maptool
run: |
mkdir -p /srv/docker/maptool
@@ -65,6 +67,24 @@ jobs:
cp -a . /srv/docker/maptool/
rm -rf /srv/docker/maptool/.git
# Regenerated on every deploy from repo secrets (Settings -> Actions
# -> Secrets) rather than created once by hand on the server — see
# docs/deployment.adoc. Values are masked in the job log by Gitea
# automatically since they come from `secrets`. Secret names here
# can't start with "GITEA_"/"GITHUB_" — Gitea reserves those prefixes
# — hence OAUTH_CLIENT_* rather than GITEA_OAUTH_CLIENT_*; the .env
# var names on the right of `=` are unaffected, still what app.rb
# actually reads.
- name: Write .env
run: |
cat > /srv/docker/maptool/.env <<EOF
SESSION_SECRET=${{ secrets.SESSION_SECRET }}
GITEA_OAUTH_CLIENT_ID=${{ secrets.OAUTH_CLIENT_ID }}
GITEA_OAUTH_CLIENT_SECRET=${{ secrets.OAUTH_CLIENT_SECRET }}
MAPTOOL_ALLOWED_GITEA_USER=${{ secrets.MAPTOOL_ALLOWED_GITEA_USER }}
EOF
chmod 600 /srv/docker/maptool/.env
- name: Deploy
run: |
cd /srv/docker/maptool