From 98fb64a30b40f2f01b6fd831e46833c934e7e213 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Wed, 6 Nov 2024 07:38:46 +0100 Subject: [PATCH] Change HTTP port for onlyoffice container. --- roles/role_deploy_onlyoffice/files/ds.conf | 8 ++++++++ roles/role_deploy_onlyoffice/tasks/main.yml | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 roles/role_deploy_onlyoffice/files/ds.conf diff --git a/roles/role_deploy_onlyoffice/files/ds.conf b/roles/role_deploy_onlyoffice/files/ds.conf new file mode 100644 index 0000000..44fed7d --- /dev/null +++ b/roles/role_deploy_onlyoffice/files/ds.conf @@ -0,0 +1,8 @@ +include /etc/nginx/includes/http-common.conf; +server { + listen 0.0.0.0:3004; + listen [::]:3004 default_server; + server_tokens off; + + include /etc/nginx/includes/ds-*.conf; +} diff --git a/roles/role_deploy_onlyoffice/tasks/main.yml b/roles/role_deploy_onlyoffice/tasks/main.yml index 2a2f544..1264a0e 100644 --- a/roles/role_deploy_onlyoffice/tasks/main.yml +++ b/roles/role_deploy_onlyoffice/tasks/main.yml @@ -47,12 +47,15 @@ - name: Deploy custom files ansible.builtin.copy: - src: "{{ item }}" + src: "{{ item.name }}" dest: "/usr/local/docker-mounted-files/docker-nextcloud-stack/{{ item }}" - mode: '0777' + mode: "{{ item.mode }}" become: true with_items: - - run-document-server.sh + - name: run-document-server.sh + mode: '0755' + - name: ds.conf + mode: '0744' - name: Create onlyoffice container containers.podman.podman_container: @@ -66,6 +69,7 @@ - /mnt/volumes/onlyoffice_data/data:/var/www/onlyoffice/Data:Z - /mnt/volumes/onlyoffice_log/data:/var/log/onlyoffice:Z - /usr/local/docker-mounted-files/docker-nextcloud-stack/run-document-server.sh:/app/ds/run-document-server.sh:z + - /usr/local/docker-mounted-files/docker-nextcloud-stack/ds.conf:/etc/nginx/conf.d/ds.conf:z network: - host generate_systemd: