homelab/bxl-shp/apps/docker-compose.onlyoffice.yaml

115 lines
4.0 KiB
YAML

services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
image: onlyoffice/documentserver:latest
restart: unless-stopped
environment:
- JWT_SECRET=${ONLYOFFICE_JWT}
- WOPI_ENABLED=true
- JWT_ENABLED=false
volumes:
- $DATA/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
- $DATA/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
- $DATA/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
- $DATA/onlyoffice/DocumentServer/db:/var/lib/postgresql
- $DATA/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq
labels:
- "traefik.enable=true"
- "traefik.http.routers.onlyoffice-editor.rule=Host(`onlyoffice-editor.bhasher.com`)"
- "traefik.http.services.onlyoffice-editor.loadbalancer.server.port=80"
- "traefik.http.routers.onlyoffice-editor.tls=true"
- "traefik.http.routers.onlyoffice-editor.tls.certresolver=http"
- "traefik.http.routers.onlyoffice-editor.entrypoints=internalsecure,externalsecure"
networks:
- external
- onlyoffice
onlyoffice-db:
container_name: onlyoffice-db
#image: mariadb:11
image: mysql:8.0.29
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${ONLYOFFICE_DB_PASS}
volumes:
- $CONFIG/onlyoffice/db/conf.d:/etc/mysql/conf.d
- $CONFIG/onlyoffice/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- $DATA/onlyoffice/CommunityServer/db:/var/lib/mysql
networks:
- onlyoffice
onlyoffice-community-server:
container_name: onlyoffice-community-server
image: onlyoffice/communityserver:12.0.1.1748
restart: unless-stopped
environment:
- ONLYOFFICE_CORE_MACHINEKEY=${ONLYOFFICE_COMMUNITY_KEY}
- CONTROL_PANEL_PORT_80_TCP=80
- CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel
- MYSQL_SERVER_ROOT_PASSWORD=${ONLYOFFICE_DB_PASS}
- MYSQL_SERVER_DB_NAME=onlyoffice
- MYSQL_SERVER_HOST=onlyoffice-db
- MYSQL_SERVER_USER=onlyoffice_user
- MYSQL_SERVER_PASS=onlyoffice_pass
- ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch
- ELASTICSEARCH_SERVER_HTTPPORT=9200
- NGINX_WORKER_PROCESSES=1
- NGINX_WORKER_CONNECTIONS=200
- CPU_PROCESSOR_COUNT=200
volumes:
- $DATA/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data
- $DATA/onlyoffice/CommunityServer/log:/var/log/onlyoffice
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroup: host
labels:
- "traefik.enable=true"
- "traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.bhasher.com`)"
- "traefik.http.services.onlyoffice.loadbalancer.server.port=80"
- "traefik.http.routers.onlyoffice.tls=true"
- "traefik.http.routers.onlyoffice.tls.certresolver=http"
- "traefik.http.routers.onlyoffice.entrypoints=internalsecure,externalsecure"
depends_on:
- onlyoffice-db
- onlyoffice-elasticsearch
networks:
- onlyoffice
- external
- auth
onlyoffice-elasticsearch:
container_name: onlyoffice-elasticsearch
image: onlyoffice/elasticsearch:7.16.3
restart: unless-stopped
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms250m -Xmx250m -Dlog4j2.formatMsgNoLookups=true"
- "indices.fielddata.cache.size=30%"
- "indices.memory.index_buffer_size=30%"
- "ingest.geoip.downloader.enabled=false"
volumes:
- $DATA/onlyoffice/CommunityServer/elasticsearch:/usr/share/elasticsearch/data
networks:
- onlyoffice
onlyoffice-control-panel:
container_name: onlyoffice-control-panel
image: onlyoffice/controlpanel:3.1.1.467
restart: unless-stopped
environment:
- ONLYOFFICE_CORE_MACHINEKEY=${ONLYOFFICE_COMMUNITY_KEY}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $DATA/onlyoffice/CommunityServer/cp-data:/var/www/onlyoffice/Data
- $DATA/onlyoffice/CommunityServer/cp-log:/var/log/onlyoffice
depends_on:
- onlyoffice-community-server
networks:
- onlyoffice
networks:
onlyoffice:
external:
external: true