ONLYOFFICE Workspace using Docker Compose
时间: 2024-01-10 11:02:22 浏览: 109
Sure! I can help you with that. Here is an example of a Docker Compose configuration for setting up ONLYOFFICE Workspace:
```yaml
version: '3'
services:
onlyoffice:
image: onlyoffice/workspace:latest
restart: always
ports:
- 80:80
- 443:443
environment:
- JWT_ENABLED=true
- JWT_SECRET=your_jwt_secret
- JWT_HEADER=Authorization
- CORS_ALLOWED_ORIGINS=*
volumes:
- ./data:/var/www/onlyoffice/Data
- ./logs:/var/log/onlyoffice
- ./certs:/var/www/onlyoffice/Data/certs
onlyoffice-mysql:
image: mysql:5.7
restart: always
environment:
- MYSQL_ROOT_PASSWORD=your_mysql_root_password
- MYSQL_DATABASE=onlyoffice
- MYSQL_USER=onlyoffice
- MYSQL_PASSWORD=your_mysql_password
volumes:
- ./mysql:/var/lib/mysql
onlyoffice-redis:
image: redis:latest
restart: always
volumes:
- ./redis:/data
onlyoffice-rabbitmq:
image: rabbitmq:3
restart: always
volumes:
- ./rabbitmq:/var/lib/rabbitmq
```
Make sure to replace the placeholder values with your own configuration. This example sets up ONLYOFFICE Workspace with MySQL, Redis, and RabbitMQ as the required dependencies.
To run ONLYOFFICE Workspace using Docker Compose, create a new directory and save the above configuration in a file named `docker-compose.yml`. Then, open a terminal, navigate to the directory containing the file, and run the following command:
```
docker-compose up -d
```
This will start the ONLYOFFICE Workspace containers in the background. You can access ONLYOFFICE Workspace by opening a web browser and entering `http://localhost` or `https://localhost` in the address bar.
Remember to adjust any firewall or network settings to allow incoming connections to the specified ports (80 and 443 in this example) if necessary.
I hope this helps! Let me know if you have any further questions.
阅读全文