Update gitea container configuration

This commit is contained in:
Francesco Antognazza 2023-02-07 14:04:06 +01:00
parent b20e218b1f
commit 0ce2f90136

View File

@ -4,6 +4,15 @@
- hosts: all - hosts: all
name: Gitea web server name: Gitea web server
tasks: tasks:
- name: Permit traffic from any IP to ssh port
become: true
community.general.ufw:
direction: in
from_ip: any
proto: tcp
to_port: 22
rule: allow
- name: Create podman volumes - name: Create podman volumes
containers.podman.podman_volume: containers.podman.podman_volume:
state: present state: present
@ -78,8 +87,8 @@
name: gitea name: gitea
image: docker.io/gitea/gitea:latest image: docker.io/gitea/gitea:latest
state: present state: present
expose: ports:
- 24 - 22:22
network: network:
- traefik-gitea - traefik-gitea
- mariadb-gitea - mariadb-gitea
@ -95,7 +104,8 @@
traefik.http.routers.gitea.tls: "true" traefik.http.routers.gitea.tls: "true"
traefik.http.routers.gitea.tls.certresolver: "wildcard" traefik.http.routers.gitea.tls.certresolver: "wildcard"
traefik.http.routers.gitea.service: "gitea" traefik.http.routers.gitea.service: "gitea"
traefik.http.routers.gitea.middlewares: "authelia@file" traefik.http.routers.gitea.middlewares: "gitea-prefixstrip@docker"
traefik.http.middlewares.gitea-prefixstrip.stripprefix.prefixes: "/git"
traefik.http.services.gitea.loadbalancer.server.port: "3000" traefik.http.services.gitea.loadbalancer.server.port: "3000"
traefik.docker.network: "traefik-gitea" traefik.docker.network: "traefik-gitea"
env: env:
@ -105,7 +115,7 @@
DOMAIN: "{{ inventory_hostname }}" DOMAIN: "{{ inventory_hostname }}"
SSH_DOMAIN: "{{ inventory_hostname }}" SSH_DOMAIN: "{{ inventory_hostname }}"
ROOT_URL: "https://{{ inventory_hostname }}/git" ROOT_URL: "https://{{ inventory_hostname }}/git"
SSH_PORT: 24 SSH_PORT: 22
DISABLE_REGISTRATION: true DISABLE_REGISTRATION: true
# REQUIRE_SIGNIN_VIEW: true # REQUIRE_SIGNIN_VIEW: true
REGISTER_EMAIL_CONFIRM: true REGISTER_EMAIL_CONFIRM: true
@ -119,20 +129,21 @@
GITEA__database__USER: "{{ vault_gitea_mariadb_user }}" GITEA__database__USER: "{{ vault_gitea_mariadb_user }}"
GITEA__database__PASSWD: "{{ vault_gitea_mariadb_password }}" GITEA__database__PASSWD: "{{ vault_gitea_mariadb_password }}"
GITEA__mailer__ENABLED: true GITEA__mailer__ENABLED: true
GITEA__mailer__PROTOCOL: "smtp"
GITEA__mailer__FROM: "{{ vault_smtp_user }}" GITEA__mailer__FROM: "{{ vault_smtp_user }}"
GITEA__mailer__MAILER_TYPE: "smtp"
GITEA__mailer__SMTP_ADDR: "{{ vault_smtp_host }}" GITEA__mailer__SMTP_ADDR: "{{ vault_smtp_host }}"
GITEA__mailer__SMTP_PORT: "{{ vault_smtp_port }}" GITEA__mailer__SMTP_PORT: "{{ vault_smtp_port }}"
GITEA__mailer__IS_TLS_ENABLED: true GITEA__mailer__USER: ""
GITEA__mailer__USER: "{{ vault_smtp_user }}" GITEA__mailer__PASSWD: ""
GITEA__mailer__PASSWD: "{{ vault_smtp_password }}" GITEA__openid__ENABLE_OPENID_SIGNIN: false
GITEA__openid__ENABLE_OPENID_SIGNUP: false
GITEA__log__MODE: "console" GITEA__log__MODE: "console"
GITEA__log__LEVEL: "info" GITEA__log__LEVEL: "info"
GITEA__service__DISABLE_REGISTRATION: true GITEA__service__DISABLE_REGISTRATION: true
GITEA__service__SIGNIN_VIEW: false GITEA__service__SIGNIN_VIEW: false
GITEA__service__REGISTER_EMAIL_CONFIRM: true GITEA__service__REGISTER_EMAIL_CONFIRM: true
GITEA__service__ENABLE_CAPTCHA: true GITEA__service__ENABLE_CAPTCHA: true
GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE: true GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE: false
GITEA__ui__THEMES: "auto,gitea,arc-green,gitea-modern" GITEA__ui__THEMES: "auto,gitea,arc-green,gitea-modern"
generate_systemd: generate_systemd:
path: /home/containers/.config/systemd/user/ path: /home/containers/.config/systemd/user/