mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-29 04:23:34 +01:00
Solved nextcloud config directory bug
This commit is contained in:
parent
d96ca6f799
commit
061d2c9d17
18
roles/docker-nextcloud/tasks/config.yml
Normal file
18
roles/docker-nextcloud/tasks/config.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
- name: Merge all files in cymais directory (container)
|
||||||
|
block:
|
||||||
|
- name: Add dynamic config merging from Jinja template
|
||||||
|
template:
|
||||||
|
src: include.php.j2
|
||||||
|
dest: "{{nextcloud_host_include_instructions_file}}"
|
||||||
|
notify: docker compose restart
|
||||||
|
|
||||||
|
- name: Copy include instructions to the container
|
||||||
|
command: >
|
||||||
|
docker cp {{ nextcloud_host_include_instructions_file }} {{ applications.nextcloud.container.application }}:{{nextcloud_docker_include_instructions_file}}
|
||||||
|
|
||||||
|
- name: Append generated config to config.php only if not present
|
||||||
|
command: >
|
||||||
|
docker exec -u {{nextcloud_docker_user}} {{ applications.nextcloud.container.application }} sh -c "
|
||||||
|
grep -q '{{ nextcloud_docker_config_additives_directory }}' {{ nextcloud_docker_config_file }} ||
|
||||||
|
cat {{nextcloud_docker_include_instructions_file}} >> {{ nextcloud_docker_config_file }}"
|
||||||
|
notify: docker compose restart
|
@ -41,24 +41,8 @@
|
|||||||
- name: Flush all handlers immediately so that occ can be used
|
- name: Flush all handlers immediately so that occ can be used
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Merge all files in cymais directory (container)
|
- name: Setup config.php
|
||||||
block:
|
include_tasks: config.yml
|
||||||
- name: Add dynamic config merging from Jinja template
|
|
||||||
template:
|
|
||||||
src: include.php.j2
|
|
||||||
dest: "{{nextcloud_host_include_instructions_file}}"
|
|
||||||
notify: docker compose restart
|
|
||||||
|
|
||||||
- name: Copy include instructions to the container
|
|
||||||
command: >
|
|
||||||
docker cp {{ nextcloud_host_include_instructions_file }} {{ applications.nextcloud.container.application }}:{{nextcloud_docker_include_instructions_file}}
|
|
||||||
|
|
||||||
- name: Append generated config to config.php only if not present
|
|
||||||
command: >
|
|
||||||
docker exec -u {{nextcloud_docker_user}} {{ applications.nextcloud.container.application }} sh -c "
|
|
||||||
grep -q '{{ nextcloud_docker_config_additives_directory }}' {{ nextcloud_docker_config_file }} ||
|
|
||||||
cat {{nextcloud_docker_include_instructions_file}} >> {{ nextcloud_docker_config_file }}"
|
|
||||||
notify: docker compose restart
|
|
||||||
|
|
||||||
- name: Setup Nextcloud Plugins
|
- name: Setup Nextcloud Plugins
|
||||||
include_tasks: plugin.yml
|
include_tasks: plugin.yml
|
||||||
|
@ -9,9 +9,7 @@ services:
|
|||||||
container_name: {{applications.nextcloud.container.application}}
|
container_name: {{applications.nextcloud.container.application}}
|
||||||
volumes:
|
volumes:
|
||||||
- data:{{nextcloud_docker_work_directory}}
|
- data:{{nextcloud_docker_work_directory}}
|
||||||
{% if applications[application_id].oidc.flavor == "oidc_login" %}
|
|
||||||
- {{nextcloud_host_config_additives_directory}}:{{nextcloud_docker_config_additives_directory}}:ro
|
- {{nextcloud_host_config_additives_directory}}:{{nextcloud_docker_config_additives_directory}}:ro
|
||||||
{% endif %}
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
||||||
interval: 1m
|
interval: 1m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user