vienalatina/infra/gitea/docker-compose.yml
Claude 724dada3f4
Brand Gitea's auth screens, and stop Salir overstating itself
Two halves of the same complaint: the journey into the members area does not
feel like one platform.

Members sign in to /comunidad/ through Gitea, so Gitea's sign-in form and
authorize dialog are part of everyone's journey, not just of anyone who opens a
repository. That is what the earlier "is Gitea only for admins?" question got
wrong. Unthemed they are two dark screens in the middle of a cream site.

Unlike Decap, Gitea supports being themed, so this needs no forking and nothing
a release can silently undo. The repository holds only the colour overrides;
scripts/gitea-theme.sh concatenates them onto the light theme it reads out of
the running container. Keeping somebody else's stylesheet in here would go
stale and turn every Gitea upgrade into a merge — the script is re-run instead,
which is one line in the upgrade notes. Getting a variable name wrong leaves a
corner grey rather than breaking a page, which is the failure mode worth having
when the names belong to someone else's project.

The logo is the site's wordmark, as live text in the same font stack rather than
traced to paths: the site loads no webfont at all, deliberately, so visitors
already see it in whatever sans-serif their machine substitutes. Paths would
render a Montserrat most people never see on the site itself.

Salir was the sharper problem. It cleared this session and the stored token, and
then said "Sesión cerrada" — while the Gitea session in the same browser stayed
open and Gitea still remembered the authorisation, so one click signed the next
person straight back in with no password. On a laptop shared around an
association, that button was lying.

It cannot be fixed from here. Gitea's logout has been POST-only since 1.11.2, so
a link cannot trigger it and a cross-site POST needs a CSRF token this app does
not have; prompt=login is undocumented in every released version of Gitea's
OAuth2 provider, and a security control should not rest on that. So the logout
page now says exactly what is closed and what is not, and links to the one place
that finishes it. Being honest about a limit beats a reassuring message that is
false.

Verified: 101 checks, two of them new — logout warns rather than redirecting,
and leaves no token the server could still act with. The theme itself is
visual and has to be looked at; docs/server-setup.md §12 says where.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-09-25 16:28:10 +00:00

39 lines
1.7 KiB
YAML

# Gitea — self-hosted git + OAuth provider for Decap and Woodpecker.
# Copy this directory to /srv/gitea/ on the server, then: docker compose up -d
# Web UI is bound to localhost only; Caddy proxies git.vienalatina.com to it.
services:
gitea:
image: gitea/gitea:1.22
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__server__DOMAIN=git.vienalatina.com
- GITEA__server__ROOT_URL=https://git.vienalatina.com/
- GITEA__server__SSH_DOMAIN=git.vienalatina.com
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__webhook__ALLOWED_HOST_LIST=ci.vienalatina.com
# Decap is served from vienalatina.com but exchanges its OAuth code for a
# token by calling git.vienalatina.com from the browser — a cross-origin
# request. Without this, Gitea returns no Access-Control-Allow-Origin, the
# browser drops the response, and Decap reports "TypeError: Failed to
# fetch" right after you authorize, which reads like a Decap bug.
- GITEA__cors__ENABLED=true
- GITEA__cors__ALLOW_DOMAIN=https://vienalatina.com
- GITEA__cors__METHODS=GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
- GITEA__cors__HEADERS=Content-Type,User-Agent,Authorization
# Members reach /comunidad/ through Gitea's sign-in and authorize
# screens, so those are part of the site's journey even for people
# who never open a repository. DEFAULT_THEME is what anonymous
# visitors get, which is exactly those two pages.
# Install the theme first: bash scripts/gitea-theme.sh
- GITEA__ui__DEFAULT_THEME=vienalatina
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "127.0.0.1:3000:3000"