pull docker images before restart; don't recursively edit premissions; use base_path in docker-compose.yaml
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 33s
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 33s
This commit is contained in:
parent
14da8cd5a1
commit
115ab7e840
@ -2,6 +2,10 @@
|
||||
ansible.builtin.import_tasks:
|
||||
file: backup.yaml
|
||||
|
||||
- name: Ensure Docker images are up to date
|
||||
community.docker.docker_compose_v2_pull:
|
||||
project_src: /opt/gitea
|
||||
|
||||
- name: Ensure Gitea is restarted
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /opt/gitea
|
||||
|
@ -25,7 +25,6 @@
|
||||
owner: "{{ git_user.uid }}"
|
||||
group: "{{ git_user.group }}"
|
||||
mode: "700"
|
||||
recurse: true
|
||||
with_items: ["data", "config"]
|
||||
|
||||
- name: Ensure docker daemon is started
|
||||
@ -85,6 +84,7 @@
|
||||
owner: root
|
||||
mode: "600"
|
||||
notify:
|
||||
- Ensure Docker images are up to date
|
||||
- Output docker compose state
|
||||
- Ensure Gitea is restarted
|
||||
- Wait until Gitea is up
|
||||
|
@ -15,8 +15,8 @@ services:
|
||||
image: gitea/gitea:{{ gitea_vars['version'] }}-rootless
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/lib/gitea/data:/var/lib/gitea
|
||||
- /var/lib/gitea/config:/etc/gitea
|
||||
- {{ gitea_vars.base_path }}/data:/var/lib/gitea
|
||||
- {{ gitea_vars.base_path }}/config:/etc/gitea
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
@ -40,6 +40,6 @@ services:
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- /var/lib/gitea/mysql:/var/lib/mysql
|
||||
- {{ gitea_vars.base_path }}/mysql:/var/lib/mysql
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
|
Loading…
Reference in New Issue
Block a user