diff --git a/roles/docker-nextcloud/files/docker-compose.yml b/roles/docker-nextcloud/files/docker-compose.yml index dda2ca6..99dc4fd 100755 --- a/roles/docker-nextcloud/files/docker-compose.yml +++ b/roles/docker-nextcloud/files/docker-compose.yml @@ -16,6 +16,7 @@ services: - MYSQL_PASSWORD=root - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud + TZ: Europe/Paris app: image: nextcloud @@ -31,3 +32,4 @@ services: - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db + TZ: Europe/Paris diff --git a/roles/docker-nextcloud/files/proxy b/roles/docker-nextcloud/files/proxy index 2f34477..534e71e 100644 --- a/roles/docker-nextcloud/files/proxy +++ b/roles/docker-nextcloud/files/proxy @@ -24,7 +24,7 @@ server { location / { proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP $remote_addr; proxy_pass http://localhost:5678; proxy_connect_timeout 900; proxy_send_timeout 900; diff --git a/roles/docker-nextcloud/tasks/main.yml b/roles/docker-nextcloud/tasks/main.yml index cc5bd3f..117363c 100644 --- a/roles/docker-nextcloud/tasks/main.yml +++ b/roles/docker-nextcloud/tasks/main.yml @@ -29,3 +29,33 @@ shell: docker-compose up -d args: chdir: /root/nextcloud + +- name: Installation de Nginx + package: + name: nginx + state: present + +- name: Copie de /etc/nginx/site-availables/proxy + copy: + src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/proxy + dest: /etc/nginx/sites-available + +- name: Supression de /etc/nginx/sites-enabled/default + file: + path: /etc/nginx/sites-enabled/default + state: absent + +- name: Creation de lien symbolique avec /etc/nginx/sites-available/proxy dans /etc/nginx/sites-enabled/proxy + shell: ln -s /etc/nginx/sites-availables/proxy proxy + args: + chdir: /etc/nginx/sites-enabled + +- name: Redemmarage de Nginx + service: + name: nginx + state: restarted + +- name: Copie de config.php dans /root/nextcloud/nextcloud/config + copy: + src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/config.php + dest: /root/nextcloud/nextcloud/config