Add compose file for nextcloud app
This commit is contained in:
parent
0581239ae6
commit
7afb860de9
81
resources/docker-compose/nextcloud.yaml.j2
Normal file
81
resources/docker-compose/nextcloud.yaml.j2
Normal file
@ -0,0 +1,81 @@
|
||||
---
|
||||
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 }}/data
|
||||
driver: glusterfs
|
||||
config:
|
||||
name: datastore{{ omni_compose_apps.nextcloud.datastore }}/config
|
||||
driver: glusterfs
|
||||
|
||||
|
||||
services:
|
||||
server:
|
||||
image: nextcloud:{{ omni_compose_apps.nextcloud.versions.server | default(omni_compose_apps.nextcloud.versions.default) }}
|
||||
hostname: nextcloud-server
|
||||
networks:
|
||||
- nextcloud
|
||||
ports:
|
||||
- published: {{ omni_compose_apps.nextcloud.ports.8080 }}
|
||||
target: 8080
|
||||
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 }}
|
||||
MYSQL_DATABASE: nextcloud
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: {{ omni_compose_app_secrets.nextcloud.database_password }}
|
||||
MYSQL_HOST: database
|
||||
REDIS_HOST: cache
|
||||
deploy:
|
||||
replicas: 1
|
||||
|
||||
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
|
Reference in New Issue
Block a user