mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-26 14:46:56 +00:00
Includes: - Talk recording tmp volume wiring for Nextcloud - ONLYOFFICE external PostgreSQL/Redis env integration - Added explicit volumes for pgdata/redis/rabbitmq - Switched ONLYOFFICE role to sys-stk-full-stateful - Updated docker-compose mounts and vars - CSP and feature flag improvements Conversation reference: https://chatgpt.com/share/6922f50e-cc44-800f-89fc-e1251c5bbe45
151 lines
5.3 KiB
Django/Jinja
151 lines
5.3 KiB
Django/Jinja
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
|
|
|
{% set service_name = NEXTCLOUD_PROXY_SERVICE %}
|
|
{{ service_name }}:
|
|
image: "{{ NEXTCLOUD_PROXY_IMAGE }}:{{ NEXTCLOUD_PROXY_VERSION }}"
|
|
container_name: "{{ NEXTCLOUD_PROXY_CONTAINER }}"
|
|
logging:
|
|
driver: journald
|
|
restart: {{ DOCKER_RESTART_POLICY }}
|
|
ports:
|
|
- "127.0.0.1:{{ NEXTCLOUD_PORT }}:{{ container_port }}"
|
|
volumes:
|
|
- "{{ NEXTCLOUD_HOST_NGINX_SRC }}:/etc/nginx/nginx.conf:ro"
|
|
volumes_from:
|
|
- {{ NEXTCLOUD_SERVICE }}
|
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.102.67
|
|
{% if NEXTCLOUD_HPB_NETWORK_MODE == 'host' %}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
{% endif %}
|
|
|
|
{% set service_name = NEXTCLOUD_SERVICE %}
|
|
{{ service_name }}:
|
|
image: "{{ NEXTCLOUD_CUSTOM_IMAGE }}"
|
|
container_name: {{ NEXTCLOUD_CONTAINER }}
|
|
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
|
|
|
|
volumes:
|
|
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
|
- {{ NEXTCLOUD_HOST_CONF_ADD_PATH }}:{{ NEXTCLOUD_DOCKER_CONF_ADD_PATH }}:ro
|
|
healthcheck:
|
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_INTERNAL_OCC_COMMAND }} status"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
ipv4_address: 192.168.102.69
|
|
|
|
{% if NEXTCLOUD_HPB_SIGNALING_ENABLED | bool %}
|
|
{% set service_name = NEXTCLOUD_HPB_SERVICE %}
|
|
{{ service_name }}:
|
|
{% set container_port = NEXTCLOUD_HPB_SIGNALING_PORT %}
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
|
image: "{{ NEXTCLOUD_HPB_IMAGE }}:{{ NEXTCLOUD_HPB_VERSION }}"
|
|
container_name: {{ NEXTCLOUD_HPB_CONTAINER }}
|
|
init: true
|
|
{% if NEXTCLOUD_HPB_NETWORK_MODE == 'bridge' and NEXTCLOUD_HPB_TURN_ONBOARD_ENABLED | bool %}
|
|
ports:
|
|
- {{ networks.internet.ip4 }}:{{ NEXTCLOUD_HPB_TURN_ONBOARD_PORT }}:{{ NEXTCLOUD_HPB_TURN_ONBOARD_PORT }}/tcp
|
|
- {{ networks.internet.ip4 }}:{{ NEXTCLOUD_HPB_TURN_ONBOARD_PORT }}:{{ NEXTCLOUD_HPB_TURN_ONBOARD_PORT }}/udp
|
|
expose:
|
|
- "{{ container_port }}"
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.102.68
|
|
{% else %}
|
|
network_mode: {{ NEXTCLOUD_HPB_NETWORK_MODE }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if NEXTCLOUD_WHITEBOARD_ENABLED %}
|
|
{% set service_name = NEXTCLOUD_WHITEBOARD_SERVICE %}
|
|
{{ service_name }}:
|
|
{% set container_port = NEXTCLOUD_WHITEBOARD_PORT_INTERNAL %}
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
build:
|
|
context: .
|
|
dockerfile: {{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}
|
|
pull_policy: never
|
|
{% include 'roles/docker-container/templates/healthcheck/nc.yml.j2' %}
|
|
image: "{{ NEXTCLOUD_WHITEBOARD_CUSTOM_IMAGE }}"
|
|
container_name: {{ NEXTCLOUD_WHITEBOARD_CONTAINER }}
|
|
volumes:
|
|
- whiteboard_tmp:/tmp
|
|
- whiteboard_fontcache:/var/cache/fontconfig
|
|
environment:
|
|
- NODE_OPTIONS=--max-old-space-size={{ NEXTCLOUD_WHITEBOARD_MAX_OLD_SPACE_SIZE }}
|
|
expose:
|
|
- "{{ container_port }}"
|
|
shm_size: 1g
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.102.71
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
{% endif %}
|
|
|
|
|
|
{% set service_name = NEXTCLOUD_CRON_SERVICE %}
|
|
{{ service_name }}:
|
|
container_name: "{{ NEXTCLOUD_CRON_CONTAINER }}"
|
|
image: "{{ NEXTCLOUD_IMAGE }}:{{ NEXTCLOUD_VERSION }}"
|
|
restart: {{ DOCKER_RESTART_POLICY }}
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
|
entrypoint: /cron.sh
|
|
healthcheck:
|
|
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_INTERNAL_OCC_COMMAND }} status"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
ipv4_address: 192.168.102.70
|
|
|
|
{% if NEXTCLOUD_RECORDING_ENABLED | bool %}
|
|
{% set service_name = 'talk_recording' %}
|
|
{{ service_name }}:
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
image: "{{ NEXTCLOUD_RECORDING_IMAGE }}:{{ NEXTCLOUD_RECORDING_VERSION }}"
|
|
container_name: "{{ NEXTCLOUD_RECORDING_CONTAINER }}"
|
|
environment:
|
|
- HPB_DOMAIN={{ NEXTCLOUD_HPB_DOMAIN }}
|
|
- NC_DOMAIN={{ NEXTCLOUD_DOMAIN }}
|
|
- RECORDING_SECRET={{ NEXTCLOUD_RECORDING_SECRET }}
|
|
- INTERNAL_SECRET={{ NEXTCLOUD_HPB_INTERNAL_SECRET }}
|
|
- TZ={{ HOST_TIMEZONE }}
|
|
expose:
|
|
- "{{ NEXTCLOUD_RECORDING_PORT }}"
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.102.72
|
|
volumes:
|
|
- talk_recording_tmp:/tmp
|
|
{% endif %}
|
|
|
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
|
data:
|
|
name: {{ NEXTCLOUD_VOLUME }}
|
|
{% if NEXTCLOUD_WHITEBOARD_ENABLED %}
|
|
whiteboard_tmp:
|
|
name: {{ NEXTCLOUD_WHITEBOARD_TMP_VOLUME }}
|
|
whiteboard_fontcache:
|
|
name: {{ NEXTCLOUD_WHITEBOARD_FRONTCACHE_VOLUME }}
|
|
{% endif %}
|
|
{% if NEXTCLOUD_RECORDING_ENABLED | bool %}
|
|
talk_recording_tmp:
|
|
name: {{ NEXTCLOUD_RECORDING_TMP_VOLUME }}
|
|
{% endif %}
|
|
|
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|