From 7e515c40e2de61fe1ea3acc54be82c5c8191c462 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Mon, 3 Apr 2023 13:35:54 +0200 Subject: [PATCH 1/3] :truck: Change git data dir from gitea to forgejo This change includes a manual directory rename on the server --- host-pottwal.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/host-pottwal.yml b/host-pottwal.yml index 891854a..1829b8e 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -37,14 +37,14 @@ tasks: - - name: Check if gitea data dir exists + - name: Check if forgejo data dir exists ansible.builtin.stat: - path: "{{ data_dir }}/gitea" - register: gitea_dir - - name: Fail if gitea data dir does not exist + path: "{{ data_dir }}/forgejo" + register: forgejo_dir + - name: Fail if forgejo data dir does not exist ansible.builtin.fail: - msg: "Gitea data dir is missing, please restore from the backup!" - when: not gitea_dir.stat.exists + msg: "Forgejo data dir is missing, please restore from the backup!" + when: not forgejo_dir.stat.exists # If port 2222 is changed here, it must also be adapted # in the gitea config file (see application volume)!! @@ -71,7 +71,7 @@ USER_UID: "1000" USER_GID: "1000" volumes: - - "{{ data_dir }}/gitea:/data:rw" + - "{{ data_dir }}/forgejo:/data:rw" - name: Setup proxy site gitea.n39.eu include_role: From 3b31b3427a2d9668b0c8a68cf354a05ff9a58923 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Mon, 3 Apr 2023 13:37:37 +0200 Subject: [PATCH 2/3] :truck: Rename git container to forgejo The gitea container must be deleted manually! --- host-pottwal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host-pottwal.yml b/host-pottwal.yml index 1829b8e..a9771e2 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -47,10 +47,10 @@ when: not forgejo_dir.stat.exists # If port 2222 is changed here, it must also be adapted - # in the gitea config file (see application volume)!! + # in the forgejo config file (see application volume)!! - name: Setup the docker container for gitea docker_container: - name: gitea + name: forgejo image: "codeberg.org/forgejo/forgejo:1.19" pull: true state: started From 4ec9865eeb9a92cf3844d3e9715f503a7d20c347 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Mon, 3 Apr 2023 13:39:08 +0200 Subject: [PATCH 3/3] :truck: Rename git host_port variable for gitea to forgejo --- host-pottwal.yml | 4 ++-- host_vars/pottwal.n39.eu/vars.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/host-pottwal.yml b/host-pottwal.yml index a9771e2..37473c5 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -57,7 +57,7 @@ restart_policy: unless-stopped detach: yes ports: - - 127.0.0.1:{{ gitea_host_port }}:3000 + - 127.0.0.1:{{ forgejo_host_port }}:3000 - 2222:2222 env: TZ: "{{ timezone }}" @@ -78,7 +78,7 @@ name: setup_http_site_proxy vars: site_name: "gitea.n39.eu" - proxy_port: "{{ gitea_host_port }}" + proxy_port: "{{ forgejo_host_port }}" - name: Ensure apt-cacher container is running docker_container: diff --git a/host_vars/pottwal.n39.eu/vars.yml b/host_vars/pottwal.n39.eu/vars.yml index b32007d..20cc119 100644 --- a/host_vars/pottwal.n39.eu/vars.yml +++ b/host_vars/pottwal.n39.eu/vars.yml @@ -29,7 +29,7 @@ influxdb_image: influxdb:2.4-alpine influxdb_init_username: admin influxdb_init_password: "{{ vault_influxdb_init_password }}" -gitea_host_port: 9091 +forgejo_host_port: 9091 prosody_config_dir: "/etc/prosody" prosody_data_dir: "{{ data_dir }}/prosody"