diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 343d6cc0..1145c2f2 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -76,10 +76,10 @@ services: redis_version: 7-alpine allowed_sender_domain: true - gitea: - file: gitea.yml + forgejo: + file: forgejo.yml domain: "git.{{ base_domain }}" - volume_folder: "{{ volume_root_folder }}/gitea" + volume_folder: "{{ volume_root_folder }}/forgejo" version: "1.20" allowed_sender_domain: true diff --git a/roles/docker/tasks/services/drone.yml b/roles/docker/tasks/services/drone.yml index f89d389b..22b71cc7 100644 --- a/roles/docker/tasks/services/drone.yml +++ b/roles/docker/tasks/services/drone.yml @@ -18,7 +18,7 @@ - "{{ services.drone.volume_folder }}:/data" - "/var/run/docker.sock:/var/run/docker.sock" environment: - DRONE_GITEA_SERVER: "https://{{ services.gitea.domain }}" + DRONE_GITEA_SERVER: "https://{{ services.forgejo.domain }}" DRONE_GITEA_CLIENT_ID: "{{ drone_secrets.oauth_client_id }}" DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}" DRONE_GIT_ALWAYS_AUTH: "true" diff --git a/roles/docker/tasks/services/forgejo.yml b/roles/docker/tasks/services/forgejo.yml new file mode 100644 index 00000000..0d26d3e6 --- /dev/null +++ b/roles/docker/tasks/services/forgejo.yml @@ -0,0 +1,37 @@ +# vim: ft=yaml.ansible +--- +- name: Create Docker network for Forgejo + docker_network: + name: forgejo + +# old DNS: 138.68.71.153 +- name: Set up Forgejo container + docker_container: + name: forgejo + image: codeberg.org/forgejo/forgejo:{{ services.forgejo.version }} + restart_policy: unless-stopped + networks: + - name: forgejo + - name: postfix + - name: external_services + volumes: + - "{{ services.forgejo.volume_folder }}:/data" + published_ports: + - "22:22" + env: + VIRTUAL_HOST: "{{ services.forgejo.domain }}" + VIRTUAL_PORT: "3000" + LETSENCRYPT_HOST: "{{ services.forgejo.domain }}" + LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" + # Forgejo customization, see: https://docs.gitea.io/en-us/install-with-docker/#customization + # https://docs.gitea.io/en-us/config-cheat-sheet/#security-security + FORGEJO__mailer__ENABLED: "true" + FORGEJO__mailer__FROM: "noreply@{{ services.forgejo.domain }}" + FORGEJO__mailer__MAILER_TYPE: "smtp" + FORGEJO__mailer__HOST: "{{ smtp_host }}:{{ smtp_port }}" + FORGEJO__security__LOGIN_REMEMBER_DAYS: "60" + FORGEJO__security__PASSWORD_COMPLEXITY: "off" + FORGEJO__security__MIN_PASSWORD_LENGTH: "8" + FORGEJO__security__PASSWORD_CHECK_PWN: "true" + FORGEJO__service__ENABLE_NOTIFY_MAIL: "true" + FORGEJO__service__REGISTER_EMAIL_CONFIRM: "true" diff --git a/roles/docker/tasks/services/gitea.yml b/roles/docker/tasks/services/gitea.yml deleted file mode 100644 index 95f65e2b..00000000 --- a/roles/docker/tasks/services/gitea.yml +++ /dev/null @@ -1,37 +0,0 @@ -# vim: ft=yaml.ansible ---- -- name: gitea network - docker_network: - name: gitea - -# old DNS: 138.68.71.153 -- name: gitea container - docker_container: - name: gitea - image: gitea/gitea:{{ services.gitea.version }} - restart_policy: unless-stopped - networks: - - name: gitea - - name: postfix - - name: external_services - volumes: - - "{{ services.gitea.volume_folder }}:/data" - published_ports: - - "22:22" - env: - VIRTUAL_HOST: "{{ services.gitea.domain }}" - VIRTUAL_PORT: "3000" - LETSENCRYPT_HOST: "{{ services.gitea.domain }}" - LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" - # Gitea customization, see: https://docs.gitea.io/en-us/install-with-docker/#customization - # https://docs.gitea.io/en-us/config-cheat-sheet/#security-security - GITEA__mailer__ENABLED: "true" - GITEA__mailer__FROM: "noreply@{{ services.gitea.domain }}" - GITEA__mailer__MAILER_TYPE: "smtp" - GITEA__mailer__HOST: "{{ smtp_host }}:{{ smtp_port }}" - GITEA__security__LOGIN_REMEMBER_DAYS: "60" - GITEA__security__PASSWORD_COMPLEXITY: "off" - GITEA__security__MIN_PASSWORD_LENGTH: "8" - GITEA__security__PASSWORD_CHECK_PWN: "true" - GITEA__service__ENABLE_NOTIFY_MAIL: "true" - GITEA__service__REGISTER_EMAIL_CONFIRM: "true"