feature(stacks): adopt gitea with secrets from OpenBao
Checks / Secret Scan (pull_request) Successful in 8s
Checks / Lint (pull_request) Successful in 1m15s

Gitea runs the deploy pipeline, so it gets its own playbook that is run by
hand and never from a workflow.
This commit is contained in:
kasun committed 2026-12-04 04:09:41 +01:00
1 parent 5309aa0cdd
commit 6e2dd06b9e
3 files changed
+64

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
---
# Run by hand from the ansible LXC only. Gitea runs the deploy pipeline, so no
# workflow may call this playbook: a broken deploy would take down the pipeline itself.
- name: Deploy Gitea
hosts: docker_hosts
gather_facts: false
tasks:
- name: Deploy gitea
ansible.builtin.include_role:
name: docker_stack
vars:
docker_stack_name: gitea
+42
View File
@@ -0,0 +1,42 @@
services:
server:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=${NON_ROOT_USER_UID}
- USER_GID=${NON_ROOT_USER_UID}
- GITEA__database__DB_TYPE=${DB_TYPE}
- GITEA__database__HOST=${DB_HOST}
- GITEA__database__NAME=${DB_NAME}
- GITEA__database__USER=${DB_USER}
- GITEA__database__PASSWD=${DB_PASSWD}
- GITEA__server__ROOT_URL=${GITEA__server__ROOT_URL}
restart: always
networks:
- pg_network
volumes:
- ${DOCKER_DATA_ROOT}/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
gitea-runner:
image: gitea/runner:latest
container_name: gitea-runner
restart: always
depends_on:
- server
networks:
- pg_network
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DOCKER_DATA_ROOT}/gitea-runner:/data
environment:
- GITEA_INSTANCE_URL=${GITEA__server__ROOT_URL}
- GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
- GITEA_RUNNER_NAME=proxmox-lab-runner
- GITEA__server__ROOT_URL=${GITEA__server__ROOT_URL}
networks:
pg_network:
external: true
+10
View File
@@ -0,0 +1,10 @@
# Rendered by Ansible from OpenBao secret/docker/gitea. Do not edit on the host.
NON_ROOT_USER_UID={{ docker_stack_secrets.NON_ROOT_USER_UID }}
DB_TYPE={{ docker_stack_secrets.DB_TYPE }}
DB_HOST={{ docker_stack_secrets.DB_HOST }}
DB_NAME={{ docker_stack_secrets.DB_NAME }}
DB_USER={{ docker_stack_secrets.DB_USER }}
DB_PASSWD={{ docker_stack_secrets.DB_PASSWD }}
GITEA__server__ROOT_URL={{ docker_stack_secrets.GITEA__server__ROOT_URL }}
DOCKER_DATA_ROOT={{ docker_stack_secrets.DOCKER_DATA_ROOT }}
RUNNER_TOKEN={{ docker_stack_secrets.RUNNER_TOKEN }}