Based on coop-cloud/forgejo 6.0.3+17.0.2-rootless. Single compose file with SQLite, settings and secret file URIs in app.ini, Caddy labels, and login only through the auth.wiki.cafe Operator Members group.
65 lines
1.3 KiB
YAML
65 lines
1.3 KiB
YAML
services:
|
|
app:
|
|
image: codeberg.org/forgejo/forgejo:17.0.2-rootless
|
|
environment:
|
|
- DOMAIN
|
|
configs:
|
|
- source: app_ini
|
|
target: /var/lib/gitea/custom/conf/app.ini
|
|
secrets:
|
|
- internal_token
|
|
- jwt_secret
|
|
- secret_key
|
|
- smtp_password
|
|
volumes:
|
|
- data:/var/lib/gitea
|
|
ports:
|
|
- target: 2222
|
|
published: 2222
|
|
protocol: tcp
|
|
mode: host
|
|
networks:
|
|
- proxy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 10
|
|
start_period: 1m
|
|
deploy:
|
|
update_config:
|
|
failure_action: rollback
|
|
order: stop-first
|
|
labels:
|
|
- "caddy=${DOMAIN}"
|
|
- "caddy.reverse_proxy={{upstreams 3000}}"
|
|
- "caddy.tls.on_demand="
|
|
- "backupbot.backup=true"
|
|
|
|
configs:
|
|
app_ini:
|
|
name: ${STACK_NAME}_app_ini_v1
|
|
file: app.ini.tmpl
|
|
template_driver: golang
|
|
|
|
secrets:
|
|
internal_token:
|
|
external: true
|
|
name: ${STACK_NAME}_internal_token
|
|
jwt_secret:
|
|
external: true
|
|
name: ${STACK_NAME}_jwt_secret
|
|
secret_key:
|
|
external: true
|
|
name: ${STACK_NAME}_secret_key
|
|
smtp_password:
|
|
external: true
|
|
name: ${STACK_NAME}_smtp_password
|
|
|
|
volumes:
|
|
data:
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|