89 lines
3.0 KiB
YAML
89 lines
3.0 KiB
YAML
networks:
|
|
gitea:
|
|
external: false
|
|
name: gitea
|
|
|
|
services:
|
|
# 1. Gitea Core Engine (SQLite Variant)
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: gitea-jms:1.26.4
|
|
container_name: gitea_server
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./gitea_data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
# Mermaid diagram size cap (older Gitea defaults to 5000; raise to modern default)
|
|
- GITEA__markup__MERMAID_MAX_SOURCE_CHARACTERS=50000
|
|
# Force Gitea to lock right onto your imported database file
|
|
- GITEA__database__DB_TYPE=sqlite3
|
|
- GITEA__database__PATH=/data/gitea.db
|
|
# Server URLs
|
|
- GITEA__server__DOMAIN=gitea.jms.rocks
|
|
- GITEA__server__ROOT_URL=https://gitea.jms.rocks/
|
|
- GITEA__server__HTTP_PORT=3000
|
|
- GITEA__server__SSH_PORT=2222
|
|
# External renderer: Jupyter notebooks (.ipynb) via nbconvert
|
|
- GITEA__markup.jupyter__ENABLED=true
|
|
- GITEA__markup.jupyter__FILE_EXTENSIONS=.ipynb
|
|
- GITEA__markup.jupyter__RENDER_COMMAND=jupyter-nbconvert --stdin --stdout --to html --template basic
|
|
- GITEA__markup.jupyter__IS_INPUT_FILE=false
|
|
- GITEA__markup.sanitizer.jupyter.img__ALLOW_DATA_URI_IMAGES=true
|
|
# Gitea Actions — lets .gitea/workflows/*.yml run on push
|
|
- GITEA__actions__ENABLED=true
|
|
# No self-signup — only an admin creates accounts, so only invited users exist
|
|
- GITEA__service__DISABLE_REGISTRATION=true
|
|
# CORS — lets the Sveltia CMS on Firebase call the Gitea API from the browser
|
|
- GITEA__cors__ENABLED=true
|
|
- GITEA__cors__SCHEME=https
|
|
- GITEA__cors__ALLOW_DOMAINS=ever-near.web.app,ever-near.me
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
- "2222:22"
|
|
|
|
# 2. SSL Reverse Proxy (Caddy)
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
container_name: gitea_ssl
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
|
- ./caddy_data:/data
|
|
- ./caddy_config:/config
|
|
networks:
|
|
- gitea
|
|
|
|
# 3. Gitea Actions runner — executes workflow jobs in Docker containers.
|
|
# Behind a profile so it only starts once you've set the registration token
|
|
# in .env (GITEA_RUNNER_REGISTRATION_TOKEN) — see README §Actions runner.
|
|
runner:
|
|
image: gitea/runner:latest
|
|
container_name: gitea_runner
|
|
restart: always
|
|
profiles: [runner]
|
|
depends_on:
|
|
- server
|
|
networks:
|
|
- gitea
|
|
volumes:
|
|
- ./runner_data:/data
|
|
- ./runner_config.yaml:/config.yaml:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
environment:
|
|
- CONFIG_FILE=/config.yaml
|
|
- GITEA_INSTANCE_URL=http://server:3000
|
|
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_REGISTRATION_TOKEN:-}
|
|
- GITEA_RUNNER_NAME=ever-near-runner
|
|
# Map the workflow's `runs-on: ubuntu-latest` to this job image
|
|
- GITEA_RUNNER_LABELS=ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest |