feat: full untested ansible setup

This commit is contained in:
Twirre Meulenbelt
2026-04-22 12:22:58 +02:00
parent b1d9b2a857
commit 0d967909e7
37 changed files with 1362 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
services:
server:
image: {{ gitea.image }}
container_name: gitea
restart: unless-stopped
environment:
USER_UID: "{{ gitea_runtime_uid }}"
USER_GID: "{{ gitea_runtime_gid }}"
GITEA__security__SECRET_KEY: "{{ vault_gitea_secret_key | default('change-me') }}"
GITEA__security__INTERNAL_TOKEN: "{{ vault_gitea_internal_token | default('change-me') }}"
GITEA__security__LFS_JWT_SECRET: "{{ vault_gitea_lfs_jwt_secret | default('change-me') }}"
GITEA__server__DOMAIN: "{{ gitea.domain }}"
GITEA__server__ROOT_URL: "https://{{ gitea.domain }}/"
GITEA__server__PROTOCOL: "http"
GITEA__server__SSH_DOMAIN: "{{ gitea.domain }}"
GITEA__server__SSH_PORT: "{{ gitea.ssh_port }}"
GITEA__server__HTTP_PORT: "{{ gitea.http_port }}"
ports:
- "{{ gitea.http_bind_address }}:{{ gitea.http_port }}:3000"
- "{{ gitea.ssh_port }}:22"
volumes:
- "{{ gitea.data_dir }}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
default:
name: {{ gitea.compose_project_name }}

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Gitea Docker Compose stack
Requires=docker.service
After=docker.service network-online.target
Wants=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory={{ gitea.path }}
ExecStart=/usr/bin/docker compose -f {{ gitea.path }}/compose.yaml up -d
ExecStop=/usr/bin/docker compose -f {{ gitea.path }}/compose.yaml down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target