feat: add ability to add extra_hosts to nextcloud docker-compose

This commit is contained in:
Bert-Jan Fikse 2026-01-15 17:29:29 +01:00
parent d3bf520bf0
commit ea8178fcf0
Signed by: bert-jan
GPG key ID: C1E0AB516AC16D1A
2 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@ nextcloud_domain: "nextcloud.local.test"
nextcloud_image: "nextcloud:fpm" nextcloud_image: "nextcloud:fpm"
nextcloud_redis_image: "redis:latest" nextcloud_redis_image: "redis:latest"
nextcloud_port: 80 nextcloud_port: 80
nextcloud_extra_hosts: []
nextcloud_postgres_image: "postgres:15" nextcloud_postgres_image: "postgres:15"
nextcloud_postgres_db: nextcloud nextcloud_postgres_db: nextcloud

View file

@ -102,6 +102,12 @@ services:
- {{ nextcloud_docker_volume_dir }}/nextcloud/:/var/www/html - {{ nextcloud_docker_volume_dir }}/nextcloud/:/var/www/html
networks: networks:
- {{ nextcloud_backend_network }} - {{ nextcloud_backend_network }}
{% if nextcloud_extra_hosts is defined and nextcloud_extra_hosts | length > 0 %}
extra_hosts:
{% for host in nextcloud_extra_hosts %}
- "{{ host }}"
{% endfor %}
{% endif %}
{% if nextcloud_enable_collabora %} {% if nextcloud_enable_collabora %}
collabora: collabora: