chore(nginx_fpm_proxy): add nextcloud_nginx_container_ports

This commit is contained in:
transcaffeine 2024-07-27 21:35:30 +02:00
parent 95aff397b8
commit 5ed71fa11a
Signed by: transcaffeine
GPG Key ID: 03624C433676E465

View File

@ -1,13 +1,13 @@
---
- name: Create directory for nginx config
file:
ansible.builtin.file:
path: "{{ nextcloud_nginx_basepath }}"
state: directory
mode: 0750
- name: Template nginx reverse proxy config for nextcloud
template:
ansible.builtin.template:
src: nextcloud-nginx.conf.j2
dest: "{{ nextcloud_nginx_config }}"
vars:
@ -18,19 +18,20 @@
notify: restart-nextcloud-nginx
- name: Ensure nginx docker image is pulled
docker_image:
community.general.docker_image:
name: "{{ nextcloud_nginx_container_image_ref }}"
state: present
source: pull
force_source: "{{ nextcloud_nginx_container_image_force_pull }}"
- name: Ensure nginx is running for FPM and static file serving
docker_container:
community.docker.docker_container:
env: "{{ nextcloud_nginx_container_env }}"
name: "{{ nextcloud_nginx_container_name }}"
image: "{{ nextcloud_nginx_container_image_ref }}"
ports: "{{ nextcloud_nginx_container_ports }}"
volumes: "{{ nextcloud_nginx_container_volumes }}"
labels: "{{ nextcloud_nginx_container_labels }}"
env: "{{ nextcloud_nginx_container_env }}"
networks: "{{ nextcloud_nginx_container_networks | default(omit) }}"
restart_policy: "{{ nextcloud_nginx_container_restart_policy }}"
state: started