Skip to content
Extraits de code Groupes Projets
Valider 997f3d58 rédigé par Sylvain Maret's avatar Sylvain Maret
Parcourir les fichiers

Initial commit

parent
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# Only office docker setup
To deploy :
* Generate a JWT token and put it in the docker compose
* Update the `.service` file with the full path to the docker compose
* Put the `onlyoffice.service` file in `/etc/systemd/system`
* Reload systemd : `systemctl daemon-reload`
* Start onlyoffice : `systemctl start onyloffice`
services:
onlyoffice-documentserver:
image: onlyoffice/documentserver:latest
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
# Generate a valid JWT token
- JWT_SECRET=TOGENERATE
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
ports:
- "80: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"
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:12
environment:
- POSTGRES_DB=onlyoffice
- POSTGRES_USER=onlyoffice
- POSTGRES_HOST_AUTH_METHOD=trust
restart: always
expose:
- "5432"
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:
[Unit]
Description=OnlyOffice server
Requires=docker.service
After=docker.service
[Service]
Restart=always
User=root
Group=docker
# Shutdown container (if running) when unit is stopped
ExecStartPre=/usr/bin/docker compose -f path_to_docker/docker-compose.yml down -v
# Start container when unit is started
ExecStart=/usr/bin/docker compose -f path_to_docker/docker-compose.yml up
# Stop container when unit is stopped
ExecStop=/usr/bin/docker compose -f path_to_docker/docker-compose.yml down -v
[Install]
WantedBy=multi-user.target
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter