# Gitea + local registry + act_runner — isolated from Tloto compose. # Postgres for Gitea uses the host Postgres (DB name: gitea), not games_platform_db. # # First boot (HTTP on :3000 until DNS/edge HTTPS): # cp .env.example .env && edit secrets # ./bootstrap-host.sh # creates DB/user + UFW # docker compose up -d gitea registry # ./bootstrap-gitea-admin.sh # ./register-runner.sh && docker compose up -d runner services: gitea: image: gitea/gitea:1.22.6 container_name: tloto_gitea restart: unless-stopped environment: USER_UID: "1000" USER_GID: "1000" GITEA__database__DB_TYPE: postgres GITEA__database__HOST: host.docker.internal:5432 GITEA__database__NAME: gitea GITEA__database__USER: gitea GITEA__database__PASSWD: ${GITEA_DB_PASSWORD} GITEA__server__DOMAIN: ${GITEA_DOMAIN:-191.215.41.53} GITEA__server__ROOT_URL: ${GITEA_ROOT_URL:-http://191.215.41.53:3000/} GITEA__server__HTTP_PORT: "3000" GITEA__server__SSH_DOMAIN: ${GITEA_DOMAIN:-191.215.41.53} # Published host port for git-ssh (container listens on 22 via image sshd) GITEA__server__SSH_PORT: ${GITEA_SSH_PORT:-2222} GITEA__server__SSH_LISTEN_PORT: "22" # false = use image OpenSSH on :22 (avoid clash with Gitea built-in SSH) GITEA__server__START_SSH_SERVER: "false" GITEA__server__DISABLE_SSH: "false" GITEA__service__DISABLE_REGISTRATION: "true" GITEA__service__REQUIRE_SIGNIN_VIEW: "false" GITEA__security__INSTALL_LOCK: "true" GITEA__security__SECRET_KEY: ${GITEA_SECRET_KEY} GITEA__security__INTERNAL_TOKEN: ${GITEA_INTERNAL_TOKEN} GITEA__session__PROVIDER: memory GITEA__actions__ENABLED: "true" # Resolve actions/checkout etc. from GitHub (not this instance) GITEA__actions__DEFAULT_ACTIONS_URL: github GITEA__openid__ENABLE_OPENID_SIGNIN: "false" GITEA__openid__ENABLE_OPENID_SIGNUP: "false" GITEA__mailer__ENABLED: "false" extra_hosts: - "host.docker.internal:host-gateway" volumes: - gitea-data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "${GITEA_HTTP_BIND:-0.0.0.0}:${GITEA_HTTP_PORT:-3000}:3000" - "${GITEA_SSH_BIND:-0.0.0.0}:${GITEA_SSH_PORT:-2222}:22" networks: - gitea-net healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:3000/"] interval: 15s timeout: 5s retries: 10 start_period: 40s registry: image: registry:2.8.3 container_name: tloto_registry restart: unless-stopped environment: REGISTRY_STORAGE_DELETE_ENABLED: "true" volumes: - registry-data:/var/lib/registry # Host loopback + docker0 (job containers cannot use 127.0.0.1 of the host) ports: - "127.0.0.1:5000:5000" - "172.16.0.1:5000:5000" networks: - gitea-net healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:5000/v2/"] interval: 20s timeout: 5s retries: 5 runner: image: gitea/act_runner:0.2.11 container_name: tloto_act_runner restart: unless-stopped depends_on: gitea: condition: service_healthy environment: CONFIG_FILE: /config.yaml GITEA_INSTANCE_URL: http://gitea:3000 GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:-} GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-tloto-vps-runner} GITEA_RUNNER_LABELS: ${GITEA_RUNNER_LABELS:-ubuntu-latest:docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm} volumes: - ./runner/config.yaml:/config.yaml:ro - runner-data:/data - /var/run/docker.sock:/var/run/docker.sock networks: - gitea-net profiles: - runner networks: gitea-net: name: tloto-gitea-net volumes: gitea-data: registry-data: runner-data: