# https://docs.nextcloud.com/server/19/admin_manual/configuration_server/config_sample_php_parameters.html#default-parameters # https://docs.nextcloud.com/server/19/admin_manual/configuration_server/caching_configuration.html#id2 --- - name: 'Create the nextcloud network' community.docker.docker_network: name: '{{ nextcloud_docker_network_name }}' - name: Make sure the Postgres container is created and running community.docker.docker_container: name: 'nextcloud-postgres' image: 'postgres:14.1-alpine' pull: true state: 'started' recreate: true env: "PUID": '{{ nextcloud_uid }}' "PGID": '{{ nextcloud_gid }}' "TZ": '{{ nextcloud_tz }}' "POSTGRES_DB": "{{ nextcloud_postgres_db }}" "POSTGRES_USER": "{{ nextcloud_postgres_user }}" "POSTGRES_PASSWORD": "{{ nextcloud_postgres_password }}" volumes: - '{{ nextcloud_data_root }}/postgres:/var/lib/postgresql/data' restart_policy: 'unless-stopped' - name: 'Make sure the Redis container is created and running' community.docker.docker_container: name: 'nextcloud-redis' image: 'redis:alpine' pull: true state: 'started' restart_policy: 'unless-stopped' - name: 'Make sure the Nextcloud container is created and running' community.docker.docker_container: name: '{{ nextcloud_container_name }}' image: 'ghcr.io/linuxserver/nextcloud:php8-24.0.4-ls81' pull: true state: 'started' env: "PUID": '{{ nextcloud_uid }}' "PGID": '{{ nextcloud_gid }}' "TZ": '{{ nextcloud_tz }}' volumes: - '{{ nextcloud_data_root }}/config:/config' - '{{ nextcloud_data_root }}/data:/data' ports: - '{{ nextcloud_host_port }}:443' restart_policy: unless-stopped - name: 'Add {{ nextcloud_container_name }} to the docker network' community.docker.docker_network: name: '{{ nextcloud_docker_network_name }}' connected: - '{{ nextcloud_container_name }}' - '{{ nextcloud_container_name }}-postgres' - '{{ nextcloud_container_name }}-redis' appends: true