implemented compose by url, parse, local yaml.

This commit is contained in:
boris committed 2026-07-10 13:32:40 +01:00
1 parent 53695f4fff
commit 784fff8faf
218 files changed
+2271 -640

No files matched your search

+1
View File
@@ -0,0 +1 @@
-6
View File
@@ -1,6 +0,0 @@
---
- name: restart gitea
community.docker.docker_compose_v2:
project_src: "{{ gitea_dir }}"
state: restarted
+15 -41
View File
@@ -8,41 +8,21 @@
mode: "0755"
tags: [gitea]
- name: Render Gitea environment
ansible.builtin.template:
src: env.j2
dest: "{{ gitea_dir }}/.env"
owner: root
group: root
mode: "0600"
no_log: true
tags: [gitea, config]
- name: Ensure Gitea proxy network exists
community.docker.docker_network:
name: "{{ gitea_traefik_network }}"
state: present
when: gitea_routing_mode == "traefik"
tags: [gitea, docker]
- name: Render Gitea Compose file
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ gitea_dir }}/compose.yaml"
owner: root
group: root
mode: "0644"
notify: restart gitea
tags: [gitea, compose]
- name: Allow Gitea ports
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ gitea_tcp_ports }}"
when: gitea_routing_mode == "host"
tags: [gitea, firewall]
- name: Deploy Gitea Compose project
ansible.builtin.include_role:
name: compose_project
vars:
compose_project_dir: "{{ gitea_dir }}"
compose_project_directories:
- "{{ gitea_dir }}"
compose_project_env_template_src: "{{ playbook_dir }}/../roles/gitea/templates/env.j2"
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/gitea/templates/compose.yaml.j2"
compose_project_override_template_src: "{{ playbook_dir }}/../roles/gitea/templates/compose.override.yaml.j2"
compose_project_create_proxy_network: "{{ gitea_routing_mode == 'traefik' }}"
compose_project_proxy_network: "{{ gitea_traefik_network }}"
compose_project_firewall_ports: "{{ gitea_tcp_ports }}"
compose_project_firewall_enabled: "{{ gitea_routing_mode in ['host', 'traefik_file'] }}"
tags: [gitea]
- name: Allow Gitea SSH port when published behind Traefik
community.general.ufw:
@@ -53,9 +33,3 @@
- gitea_routing_mode == "traefik"
- gitea_publish_ssh | bool
tags: [gitea, firewall]
- name: Start Gitea
community.docker.docker_compose_v2:
project_src: "{{ gitea_dir }}"
state: present
tags: [gitea, compose]
@@ -0,0 +1,3 @@
services:
gitea: {}
+3 -3
View File
@@ -3,10 +3,10 @@ services:
image: {{ gitea_image }}
restart: unless-stopped
env_file: .env
{% if gitea_routing_mode == "host" or gitea_publish_ssh | bool %}
{% if gitea_routing_mode in ["host", "traefik_file"] or gitea_publish_ssh | bool %}
ports:
{% if gitea_routing_mode == "host" %}
- "{{ gitea_http_port }}:3000"
{% if gitea_routing_mode in ["host", "traefik_file"] %}
- "{{ nbops_traefik_file_bind_address if gitea_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ gitea_http_port }}:3000"
{% endif %}
{% if gitea_publish_ssh | bool %}
- "{{ gitea_ssh_port }}:22"
+7
View File
@@ -0,0 +1,7 @@
# Upstream Snapshot
This directory stores copied upstream reference files for the `gitea` role.
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.