88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
|
---
|
||
|
version: "{{ omni_compose_version | string }}"
|
||
|
|
||
|
|
||
|
networks:
|
||
|
nextcloud:
|
||
|
name: nextcloud
|
||
|
driver: overlay
|
||
|
ipam:
|
||
|
driver: default
|
||
|
config:
|
||
|
- subnet: {{ omni_compose_apps.nextcloud.networks.main }}
|
||
|
|
||
|
|
||
|
volumes:
|
||
|
database:
|
||
|
name: datastore{{ omni_compose_apps.nextcloud.datastore }}/database
|
||
|
driver: glusterfs
|
||
|
data:
|
||
|
name: datastore/{{ omni_compose_apps.nextcloud.datastore }}/userdata
|
||
|
driver: glusterfs
|
||
|
config:
|
||
|
name: datastore{{ omni_compose_apps.nextcloud.datastore }}/config
|
||
|
driver: glusterfs
|
||
|
|
||
|
|
||
|
services:
|
||
|
database:
|
||
|
image: mariadb:{{ omni_compose_apps.nextcloud.versions.database | default(omni_compose_apps.nextcloud.versions.default) }}
|
||
|
hostname: nextcloud-database
|
||
|
networks:
|
||
|
- nextcloud
|
||
|
volumes:
|
||
|
- type: volume
|
||
|
source: database
|
||
|
target: /var/lib/mysql
|
||
|
read_only: false
|
||
|
environment:
|
||
|
MYSQL_ROOT_PASSWORD: {{ omni_compose_app_secrets.nextcloud.database_password }}
|
||
|
MYSQL_DATABASE: nextcloud
|
||
|
deploy:
|
||
|
replicas: 1
|
||
|
|
||
|
cache:
|
||
|
image: redis:{{ omni_compose_apps.nextcloud.versions.cache | default(omni_compose_apps.nextcloud.versions.default) }}
|
||
|
hostname: nextcloud-cache
|
||
|
networks:
|
||
|
- nextcloud
|
||
|
deploy:
|
||
|
replicas: 1
|
||
|
|
||
|
server:
|
||
|
image: nextcloud:{{ omni_compose_apps.nextcloud.versions.server | default(omni_compose_apps.nextcloud.versions.default) }}
|
||
|
hostname: nextcloud-server
|
||
|
networks:
|
||
|
- nextcloud
|
||
|
depends_on:
|
||
|
- database
|
||
|
- cache
|
||
|
ports:
|
||
|
- published: {{ omni_compose_apps.nextcloud.published.ports.80 }}
|
||
|
target: 80
|
||
|
protocol: tcp
|
||
|
mode: ingress
|
||
|
volumes:
|
||
|
- type: volume
|
||
|
source: data
|
||
|
target: /data
|
||
|
read_only: false
|
||
|
- type: volume
|
||
|
source: config
|
||
|
target: /var/www/html
|
||
|
read_only: false
|
||
|
environment:
|
||
|
NEXTCLOUD_DATA_DIR: /data/
|
||
|
NEXTCLOUD_ADMIN_USER: admin
|
||
|
NEXTCLOUD_ADMIN_PASSWORD: {{ omni_compose_app_secrets.nextcloud.admin_password }}
|
||
|
NEXTCLOUD_TRUSTED_DOMAINS: localhost {{ inventory_hostname }} {{ omni_compose_apps.nextcloud.published.host }}
|
||
|
MYSQL_DATABASE: nextcloud
|
||
|
MYSQL_USER: root
|
||
|
MYSQL_PASSWORD: {{ omni_compose_app_secrets.nextcloud.database_password }}
|
||
|
MYSQL_HOST: database
|
||
|
REDIS_HOST: cache
|
||
|
PHP_MEMORY_LIMIT: "4G"
|
||
|
PHP_UPLOAD_LIMIT: "4G"
|
||
|
deploy:
|
||
|
replicas: 1
|