forked from data.coop/ansible
Switch to Forgejo, close #145
This commit is contained in:
parent
bb145efff2
commit
a741a0c26c
|
@ -76,10 +76,10 @@ services:
|
||||||
redis_version: 7-alpine
|
redis_version: 7-alpine
|
||||||
allowed_sender_domain: true
|
allowed_sender_domain: true
|
||||||
|
|
||||||
gitea:
|
forgejo:
|
||||||
file: gitea.yml
|
file: forgejo.yml
|
||||||
domain: "git.{{ base_domain }}"
|
domain: "git.{{ base_domain }}"
|
||||||
volume_folder: "{{ volume_root_folder }}/gitea"
|
volume_folder: "{{ volume_root_folder }}/forgejo"
|
||||||
version: "1.20"
|
version: "1.20"
|
||||||
allowed_sender_domain: true
|
allowed_sender_domain: true
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
- "{{ services.drone.volume_folder }}:/data"
|
- "{{ services.drone.volume_folder }}:/data"
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
environment:
|
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_ID: "{{ drone_secrets.oauth_client_id }}"
|
||||||
DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}"
|
DRONE_GITEA_CLIENT_SECRET: "{{ drone_secrets.oauth_client_secret }}"
|
||||||
DRONE_GIT_ALWAYS_AUTH: "true"
|
DRONE_GIT_ALWAYS_AUTH: "true"
|
||||||
|
|
37
roles/docker/tasks/services/forgejo.yml
Normal file
37
roles/docker/tasks/services/forgejo.yml
Normal file
|
@ -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"
|
|
@ -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"
|
|
Loading…
Reference in a new issue