From 0ce2f9013635a46b4dd45385d851db959a6b93de Mon Sep 17 00:00:00 2001 From: Francesco Antognazza Date: Tue, 7 Feb 2023 14:04:06 +0100 Subject: [PATCH] Update gitea container configuration --- containers/gitea/tasks.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/containers/gitea/tasks.yml b/containers/gitea/tasks.yml index b239b4d..69f7370 100644 --- a/containers/gitea/tasks.yml +++ b/containers/gitea/tasks.yml @@ -4,6 +4,15 @@ - hosts: all name: Gitea web server 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 containers.podman.podman_volume: state: present @@ -78,8 +87,8 @@ name: gitea image: docker.io/gitea/gitea:latest state: present - expose: - - 24 + ports: + - 22:22 network: - traefik-gitea - mariadb-gitea @@ -95,7 +104,8 @@ traefik.http.routers.gitea.tls: "true" traefik.http.routers.gitea.tls.certresolver: "wildcard" 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.docker.network: "traefik-gitea" env: @@ -105,7 +115,7 @@ DOMAIN: "{{ inventory_hostname }}" SSH_DOMAIN: "{{ inventory_hostname }}" ROOT_URL: "https://{{ inventory_hostname }}/git" - SSH_PORT: 24 + SSH_PORT: 22 DISABLE_REGISTRATION: true # REQUIRE_SIGNIN_VIEW: true REGISTER_EMAIL_CONFIRM: true @@ -119,20 +129,21 @@ GITEA__database__USER: "{{ vault_gitea_mariadb_user }}" GITEA__database__PASSWD: "{{ vault_gitea_mariadb_password }}" GITEA__mailer__ENABLED: true + GITEA__mailer__PROTOCOL: "smtp" GITEA__mailer__FROM: "{{ vault_smtp_user }}" - GITEA__mailer__MAILER_TYPE: "smtp" GITEA__mailer__SMTP_ADDR: "{{ vault_smtp_host }}" GITEA__mailer__SMTP_PORT: "{{ vault_smtp_port }}" - GITEA__mailer__IS_TLS_ENABLED: true - GITEA__mailer__USER: "{{ vault_smtp_user }}" - GITEA__mailer__PASSWD: "{{ vault_smtp_password }}" + GITEA__mailer__USER: "" + GITEA__mailer__PASSWD: "" + GITEA__openid__ENABLE_OPENID_SIGNIN: false + GITEA__openid__ENABLE_OPENID_SIGNUP: false GITEA__log__MODE: "console" GITEA__log__LEVEL: "info" GITEA__service__DISABLE_REGISTRATION: true GITEA__service__SIGNIN_VIEW: false GITEA__service__REGISTER_EMAIL_CONFIRM: 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" generate_systemd: path: /home/containers/.config/systemd/user/