added nextcloud and onlyoffice

This commit is contained in:
hyung-hwan 2022-10-20 20:21:55 +09:00
parent 7ab61b5805
commit 5928f7c245
3 changed files with 121 additions and 0 deletions

View File

@ -102,6 +102,23 @@ stack-up-grafana:
stack-down-grafana:
docker stack rm grafana-stack
stack-up-nextcloud:
[ -d /media/seagate-1000/nextcloud ] || mkdir /media/seagate-1000/nextcloud
docker stack deploy --compose-file nextcloud.yml nextcloud-stack
stack-down-nextcloud:
docker stack rm nextcloud-stack
stack-up-onlyoffice:
[ -d /media/seagate-1000/onlyoffice ] || mkdir /media/seagate-1000/onlyoffice
[ -d /media/seagate-1000/onlyoffice/data ] || mkdir /media/seagate-1000/onlyoffice/data
[ -d /media/seagate-1000/onlyoffice/logs ] || mkdir /media/seagate-1000/onlyoffice/logs
docker stack deploy --compose-file onlyoffice.yml onlyoffice-stack
stack-down-onlyoffice:
docker stack rm onlyoffice-stack
stack-up-monitor: stack-up-prometheus-node-exporter stack-up-prometheus stack-up-grafana
stack-down-monitor: stack-down-grafana stack-down-prometheus stack-down-prometheus-node-exporter

View File

@ -0,0 +1,47 @@
version: '3.8'
networks:
host-network:
name: host
external: true
prometheus-network:
external: true
traefik-network:
external: true
database-network:
external: true
services:
nextcloud-service:
image: docker.io/nextcloud:24-apache
hostname: nextcloud-service-host
networks:
- traefik-network
volumes:
- type: bind
source: /media/seagate-1000/nextcloud
target: /var/www/html
deploy:
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
constraints:
##- node.role == manager
- node.hostname == rose
resources:
reservations:
memory: 1GB
limits:
memory: 2GB
restart_policy:
condition: on-failure
labels:
- traefik.enable=true
##- traefik.docker.network=traefik-network
- traefik.http.routers.nextcloud-https.entrypoints=websec
- traefik.http.routers.nextcloud-https.rule=Host(`nc.miflux.com`)
- traefik.http.routers.nextcloud-https.tls=true
- traefik.http.services.nextcloud-service.loadbalancer.server.port=80
- traefik.http.services.nextcloud-service.loadbalancer.sticky.cookie=true
- traefik.http.services.nextcloud-service.loadbalancer.sticky.cookie.name=nextcloud-sticker

View File

@ -0,0 +1,57 @@
version: '3.8'
networks:
host-network:
name: host
external: true
prometheus-network:
external: true
traefik-network:
external: true
database-network:
external: true
services:
onlyoffice-service:
image: docker.io/onlyoffice/documentserver:7.2
hostname: onlyoffice-service-host
networks:
- traefik-network
volumes:
- type: bind
source: /media/seagate-1000/onlyoffice/data
target: /var/www/onlyoffice/Data
- type: bind
source: /media/seagate-1000/onlyoffice/logs
target: /var/log/onlyoffice
environment:
- JWT_ENABLED=true
- JWT_SECRET=bf420c41310528273eb307be6d78a432abc7b0276bb8590304e13de09db2dc44
deploy:
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
##constraints:
##- node.role == worker
##- node.role == manager
resources:
reservations:
memory: 1GB
limits:
memory: 2GB
restart_policy:
condition: on-failure
labels:
- traefik.enable=true
##- traefik.docker.network=traefik-network
- traefik.http.routers.onlyoffice-https.entrypoints=websec
- traefik.http.routers.onlyoffice-https.rule=Host(`oo.miflux.com`)
- traefik.http.routers.onlyoffice-https.tls=true
- traefik.http.services.onlyoffice-service.loadbalancer.server.port=80
- traefik.http.services.onlyoffice-service.loadbalancer.sticky.cookie=true
- traefik.http.services.onlyoffice-service.loadbalancer.sticky.cookie.name=onlyoffice-sticker
## wss:// access has an issue without followings:
- traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Proto=https
- traefik.http.middlewares.onlyoffice-headers.headers.accessControlAllowOriginList=*
- traefik.http.routers.onlyoffice-https.middlewares=onlyoffice-headers