187c6bdea4
- Add local Dovecot IMAP server exposed via Traefik IMAPS on port 993; Roundcube now connects to it internally instead of requiring manual server entry - Add Fetchmail integration for pulling from external POP3 accounts with configurable per-account poll interval - Fix Gitea SSO registration: DISABLE_REGISTRATION=false + ALLOW_ONLY_EXTERNAL_REGISTRATION allows Keycloak-authenticated users to get accounts while blocking public sign-up; disable legacy OpenID 2.0 sign-in - Fix Keycloak post-logout redirect for Nextcloud (valid post logout redirect URI) - Replace all pre-hashed credentials (Traefik dashboard, registry, Dovecot) with plaintext passwords in vault; Ansible generates deterministic bcrypt/SHA-512 hashes at deploy time — no more manual htpasswd commands - Rewrite check-vault.sh with Python/PyYAML to properly validate both scalar and list-type secrets - Update provisioning and configuration runbooks throughout
72 lines
2.4 KiB
Django/Jinja
72 lines
2.4 KiB
Django/Jinja
# Managed by Ansible — do not edit manually
|
|
services:
|
|
gitea:
|
|
image: gitea/gitea:{{ gitea_version }}
|
|
container_name: gitea
|
|
restart: unless-stopped
|
|
environment:
|
|
# Database
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=gitea-db:5432
|
|
- GITEA__database__NAME=gitea
|
|
- GITEA__database__USER=gitea
|
|
- GITEA__database__PASSWD={{ gitea_db_password }}
|
|
# Server
|
|
- GITEA__server__DOMAIN={{ domain_gitea }}
|
|
- GITEA__server__ROOT_URL=https://{{ domain_gitea }}
|
|
- GITEA__server__HTTP_PORT=3000
|
|
- GITEA__server__SSH_DOMAIN={{ domain_gitea }}
|
|
- GITEA__server__SSH_PORT=2222
|
|
# Security
|
|
- GITEA__security__SECRET_KEY={{ gitea_secret_key }}
|
|
- GITEA__security__INTERNAL_TOKEN={{ gitea_internal_token }}
|
|
# Allow account creation only via external auth (OAuth2/SSO).
|
|
# DISABLE_REGISTRATION=false is explicit because the setup wizard writes true to app.ini;
|
|
# ALLOW_ONLY_EXTERNAL_REGISTRATION then hides the sign-up form so only SSO accounts work.
|
|
- GITEA__service__DISABLE_REGISTRATION=false
|
|
- GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION=true
|
|
# Disable legacy OpenID 2.0 sign-in (distinct from the Keycloak OAuth2 integration)
|
|
- GITEA__openid__ENABLE_OPENID_SIGNIN=false
|
|
- GITEA__openid__ENABLE_OPENID_SIGNUP=false
|
|
volumes:
|
|
- {{ gitea_data_dir }}/data:/data
|
|
ports:
|
|
- "2222:22"
|
|
networks:
|
|
- traefik_public
|
|
- gitea_internal
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.gitea.rule=Host(`{{ domain_gitea }}`)"
|
|
- "traefik.http.routers.gitea.entrypoints=websecure"
|
|
- "traefik.http.routers.gitea.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.gitea.middlewares=rate-limit@docker"
|
|
depends_on:
|
|
gitea-db:
|
|
condition: service_healthy
|
|
|
|
gitea-db:
|
|
image: postgres:{{ gitea_db_version }}
|
|
container_name: gitea-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=gitea
|
|
- POSTGRES_PASSWORD={{ gitea_db_password }}
|
|
- POSTGRES_DB=gitea
|
|
volumes:
|
|
- {{ gitea_data_dir }}/db:/var/lib/postgresql/data
|
|
networks:
|
|
- gitea_internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U gitea"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
traefik_public:
|
|
external: true
|
|
gitea_internal:
|
|
internal: true
|