This commit is contained in:
parent
306d2eebbe
commit
c28214c517
@ -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
|
||||
|
@ -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 }}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user