赞
踩
只介绍环境搭建 不介绍集成
内核:Linux
操作系统:centos 或者 ubuntu
容器环境:docker
容器镜像:onlyoffice-documentserver
https://download.docker.com/linux/centos/
http://docker-release-blue-prod.s3-website-us-east-1.amazonaws.com/linux/centos/7/x86_64/stable/Packages/
http://docker-release-blue-prod.s3-website-us-east-1.amazonaws.com/linux/static/stable/x86_64/
https://download.docker.com
https://download.docker.com/linux
http://docker-release-blue-prod.s3-website-us-east-1.amazonaws.com/linux/centos/7/x86_64/stable/Packages/docker-ce-20.10.0-3.el7.x86_64.rpm
yum install docker-ce-20.10.0-3.el7.x86_64.rpm
https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64
curl -O https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64
将下载的docker-compose 移动到/usr/bin目录下
mv ./docker-compose-Linux-x86_64 /usr/bin/docker-compose
配置docker服务
vim /etc/systemd/system/docker.service
[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s
运行docker systemctl
systemctl start docker
开机自动启动docker
systemctl enable docker
创建docker-compose.yml文件
vim docker-compose.yml
配置onlyoffice-documentserver
onlyoffice-rabbitmq
onlyoffice-postgresql
version: '2' services: onlyoffice-documentserver: build: context: . container_name: onlyoffice-documentserver depends_on: - onlyoffice-postgresql - onlyoffice-rabbitmq environment: - DB_TYPE=postgres - DB_HOST=onlyoffice-postgresql - DB_PORT=5432 - DB_NAME=onlyoffice - DB_USER=onlyoffice - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq # Uncomment strings below to enable the JSON Web Token validation. #- JWT_ENABLED=true #- JWT_SECRET=secret #- JWT_HEADER=Authorization #- JWT_IN_BODY=true ports: - '8088:80' - '443:443' stdin_open: true restart: always stop_grace_period: 60s volumes: - /var/www/onlyoffice/Data - /var/log/onlyoffice - /var/lib/onlyoffice/documentserver/App_Data/cache/files - /var/www/onlyoffice/documentserver-example/public/files - /usr/share/fonts onlyoffice-rabbitmq: container_name: onlyoffice-rabbitmq image: rabbitmq restart: always expose: - '5672' ports: - '5672:5672' onlyoffice-postgresql: container_name: onlyoffice-postgresql image: postgres:9.5 environment: - POSTGRES_DB=onlyoffice - POSTGRES_USER=onlyoffice - POSTGRES_HOST_AUTH_METHOD=trust restart: always expose: - '5432' ports: - '5432:5432' volumes: - postgresql_data:/var/lib/postgresql volumes: postgresql_data:
使用docker-compose后台运行onlyoffice
docker-compose up -d
运行之后的效果
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。