2022-08-05 15:29:05 +02:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
version: '3.1'
|
|
|
|
|
|
|
|
services:
|
|
|
|
nextcloud:
|
|
|
|
image: nextcloud:{{ docker_nextcloud_version }}
|
|
|
|
volumes:
|
|
|
|
- {{ docker_nextcloud_data_dir }}/{{ docker_nextcloud_service_id }}/nextcloud:/var/www/html
|
|
|
|
- ./php.ini:/usr/local/etc/php/php.ini
|
2022-12-12 18:39:07 +01:00
|
|
|
{% if docker_nextcloud_custom_volumes is defined %}
|
|
|
|
{% for volume in docker_nextcloud_custom_volumes %}
|
|
|
|
- {{ volume.volume }}:{{ volume.target }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-08-05 15:29:05 +02:00
|
|
|
restart: always
|
|
|
|
depends_on:
|
2024-01-14 20:05:58 +01:00
|
|
|
db:
|
|
|
|
condition: service_healthy
|
2022-08-05 15:29:05 +02:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=traefik"
|
|
|
|
- "traefik.http.routers.{{ docker_nextcloud_service_id }}.entrypoints=web"
|
|
|
|
- "traefik.http.routers.{{ docker_nextcloud_service_id }}.rule=Host(`{{ docker_nextcloud_fqdn }}`)"
|
|
|
|
- "traefik.http.services.{{ docker_nextcloud_service_id }}.loadbalancer.server.port=80"
|
|
|
|
networks:
|
|
|
|
- nextcloud
|
|
|
|
- traefik
|
|
|
|
environment:
|
|
|
|
- POSTGRES_HOST=db
|
|
|
|
- POSTGRES_DB={{ docker_nextcloud_db }}
|
|
|
|
- POSTGRES_USER={{ docker_nextcloud_db_user }}
|
|
|
|
- POSTGRES_PASSWORD={{ docker_nextcloud_db_password }}
|
|
|
|
- SMTP_HOST={{ docker_nextcloud_smtp_host }}
|
2024-01-14 20:05:58 +01:00
|
|
|
- OVERWRITEPROTOCOL=https
|
|
|
|
- OVERWRITECLIURL=https://{{ docker_nextcloud_fqdn }}
|
|
|
|
- TRUSTED_PROXIES={{ docker_nextcloud_trusted_proxies }}
|
2022-08-05 15:29:05 +02:00
|
|
|
|
|
|
|
db:
|
2024-01-14 20:05:58 +01:00
|
|
|
image: postgres:14
|
2022-08-05 15:29:05 +02:00
|
|
|
restart: always
|
2024-01-14 20:05:58 +01:00
|
|
|
shm_size: 256mb
|
|
|
|
networks:
|
|
|
|
- nextcloud
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
2022-08-05 15:29:05 +02:00
|
|
|
volumes:
|
|
|
|
- {{ docker_nextcloud_data_dir }}/{{ docker_nextcloud_service_id }}/db:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
- POSTGRES_DB={{ docker_nextcloud_db }}
|
|
|
|
- POSTGRES_USER={{ docker_nextcloud_db_user }}
|
|
|
|
- POSTGRES_PASSWORD={{ docker_nextcloud_db_password }}
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
nextcloud:
|
|
|
|
internal: true
|