Initial commit: nult - Ansible deployment toolkit
Merged from veridion-gitea and veridion-act-runner-gitea repos. nult (Null-T) - instant teleportation from Strugatsky's Noon Universe. Like Null-T, this toolkit instantly deploys infrastructure. Roles: - gitea: Gitea server with PostgreSQL (Docker Compose) - act_runner: Gitea Actions runner Playbooks: - gitea.yml: Deploy Gitea server - act-runner.yml: Deploy Act Runner - site.yml: Deploy all services Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
72
roles/gitea/templates/docker-compose.yml.j2
Normal file
72
roles/gitea/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,72 @@
|
||||
# Gitea with PostgreSQL - Docker Compose
|
||||
#
|
||||
# Based on: https://docs.gitea.com/installation/install-with-docker
|
||||
# Healthchecks from: https://docs.gitea.com/installation/install-on-kubernetes
|
||||
# https://github.com/go-gitea/gitea/pull/35513
|
||||
#
|
||||
# Generated by Ansible - do not edit manually.
|
||||
|
||||
networks:
|
||||
gitea:
|
||||
external: false
|
||||
|
||||
volumes:
|
||||
gitea:
|
||||
driver: local
|
||||
postgres:
|
||||
driver: local
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:{{ gitea_postgres_version }}
|
||||
container_name: {{ gitea_db_container_name }}
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER={{ gitea_db_user }}
|
||||
- POSTGRES_PASSWORD={{ gitea_db_password }}
|
||||
- POSTGRES_DB={{ gitea_db_name }}
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
# PostgreSQL readiness check
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "{{ gitea_db_user }}", "-d", "{{ gitea_db_name }}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
server:
|
||||
image: docker.io/gitea/gitea:{{ gitea_version }}
|
||||
container_name: {{ gitea_container_name }}
|
||||
restart: always
|
||||
environment:
|
||||
- USER_UID={{ gitea_user_uid }}
|
||||
- USER_GID={{ gitea_user_gid }}
|
||||
- GITEA__database__DB_TYPE={{ gitea_db_type }}
|
||||
- GITEA__database__HOST={{ gitea_db_host }}
|
||||
- GITEA__database__NAME={{ gitea_db_name }}
|
||||
- GITEA__database__USER={{ gitea_db_user }}
|
||||
- GITEA__database__PASSWD={{ gitea_db_password }}
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- /home/git/.ssh/:/data/git/.ssh
|
||||
- gitea:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "443:{{ gitea_http_port }}"
|
||||
- "127.0.0.1:{{ gitea_ssh_external_port }}:{{ gitea_ssh_port }}"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
# Gitea health endpoint (per K8s docs and PR #35513)
|
||||
# start_period allows time for database migrations on upgrade
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fSs", "http://127.0.0.1:{{ gitea_http_port }}/api/healthz"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 120s
|
||||
Reference in New Issue
Block a user