initial commit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthias Johnson 2026-02-27 15:09:25 -07:00
commit 75891c3271
129 changed files with 8046 additions and 0 deletions

View file

@ -0,0 +1,71 @@
APP_NAME = {{ forgejo_app_name }}
RUN_MODE = prod
WORK_PATH = /data/gitea
[server]
DOMAIN = {{ forgejo_domain }}
ROOT_URL = https://{{ forgejo_domain }}/
HTTP_PORT = 3000
SSH_DOMAIN = {{ forgejo_domain }}
SSH_PORT = {{ forgejo_ssh_port }}
START_SSH_SERVER = true
[database]
DB_TYPE = sqlite3
PATH = /data/gitea/gitea.db
[repository]
ROOT = /data/git/repositories
[log]
MODE = console
LEVEL = Info
[security]
INSTALL_LOCK = true
SECRET_KEY = {{ forgejo_secret_key }}
INTERNAL_TOKEN = {{ forgejo_internal_token }}
[service]
DISABLE_REGISTRATION = {{ forgejo_disable_registration }}
REQUIRE_SIGNIN_VIEW = {{ forgejo_require_signin }}
DEFAULT_KEEP_EMAIL_PRIVATE = true
[mailer]
ENABLED = {{ forgejo_mailer_enabled }}
{% if forgejo_mailer_enabled %}
FROM = {{ forgejo_mailer_from }}
PROTOCOL = smtp
SMTP_ADDR = {{ forgejo_smtp_host }}
SMTP_PORT = {{ forgejo_smtp_port }}
USER = {{ forgejo_smtp_user }}
PASSWD = {{ forgejo_smtp_password }}
{% endif %}
[session]
PROVIDER = file
[picture]
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = true
[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false
[oauth2]
JWT_SECRET = {{ forgejo_jwt_secret }}
[attachment]
ENABLED = true
MAX_SIZE = 50
[time]
DEFAULT_UI_LOCATION = {{ forgejo_timezone }}
[metrics]
ENABLED = true
[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = https://code.forgejo.org

View file

@ -0,0 +1,49 @@
services:
forgejo:
image: codeberg.org/forgejo/forgejo:{{ forgejo_version }}
container_name: forgejo
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
volumes:
- /srv/forgejo/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "{{ forgejo_port }}:3000"
- "{{ forgejo_ssh_port }}:2222"
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:3000/api/v1/version || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
networks:
- git
- monitoring
{% if enable_forgejo_runner | default(true) %}
runner:
image: code.forgejo.org/forgejo/runner:{{ forgejo_runner_version }}
container_name: forgejo-runner
restart: unless-stopped
user: "0:0"
depends_on:
forgejo:
condition: service_healthy
volumes:
- /srv/forgejo/runner:/data
- /var/run/docker.sock:/var/run/docker.sock
environment:
DOCKER_HOST: unix:///var/run/docker.sock
command: forgejo-runner daemon --config /data/config.yml
networks:
- git
{% endif %}
networks:
git:
external: true
monitoring:
external: true

View file

@ -0,0 +1,14 @@
log:
level: info
runner:
file: .runner
capacity: 1
timeout: 3h
container:
# job containers must be on this network to resolve the forgejo hostname for git operations
network: "git"
privileged: false
valid_volumes:
- '**'