move data to /var/lib/gitea
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 25s

This commit is contained in:
Marius Meyer 2024-06-03 14:02:44 +02:00
parent 306d2eebbe
commit c28214c517
3 changed files with 10 additions and 8 deletions

View File

@ -18,7 +18,7 @@
- name: Backup Gitea directory
community.general.archive:
path: /opt/gitea/
path: /var/lib/gitea/
dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date -u +%Y-%m-%dT%H:%M:%SZ') }}.tar.gz"
force_archive: true
format: gz

View File

@ -10,16 +10,18 @@
name: git
register: git_user
- name: Ensure Gitea directory exists
- name: Ensure Gitea directories exist
ansible.builtin.file:
path: "/opt/gitea"
path: "{{ item }}"
state: directory
owner: root
mode: "755"
recurse: yes
with_items: ["/opt/gitea", "/var/lib/gitea"]
- name: Ensure data directory exists
ansible.builtin.file:
path: "/opt/gitea/data"
path: "/var/lib/gitea/data"
state: directory
owner: "{{ git_user.uid }}"
group: "{{ git_user.group }}"
@ -27,7 +29,7 @@
- name: Ensure config directory exists
ansible.builtin.file:
path: "/opt/gitea/config"
path: "/var/lib/gitea/config"
state: directory
owner: "{{ git_user.uid }}"
group: "{{ git_user.group }}"

View File

@ -15,8 +15,8 @@ services:
image: gitea/gitea:{{ gitea_vars['version'] }}-rootless
restart: unless-stopped
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /var/lib/gitea/data:/var/lib/gitea
- /var/lib/gitea/config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
@ -40,6 +40,6 @@ services:
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql
- /var/lib/gitea/mysql:/var/lib/mysql
cap_add:
- SYS_NICE