Connecting MsSQL database to ONLYOFFICE Docs
+-
+
Currently, there are no Docker variables that allow connecting with MsSQL; the user must perform the steps manually. The steps to connect MsSQL database to ONLYOFFICE Docs are as follows:
+-
+
-
+ Install ONLYOFFICE Docs:
+
+sudo docker run -i -t -d -p 80:80 --name onlyoffice \ +onlyoffice/documentserver-ee
+ -
+ Install MsSQL on the same or a separate server:
+
+sudo docker run -p 8080:1433 -d --name mssql \ +-e "ACCEPT_EULA=Y" \ +-e "MSSQL_SA_PASSWORD=onlYoff1ce" \ +mcr.microsoft.com/mssql/server:2022-latest +
+ -
+ Download a script for creating tables and copy it to the container; afterwards, create a database and run the script:
+
+wget https://github.com/ONLYOFFICE/server/raw/master/schema/mssql/createdb.sql +sudo docker cp ./createdb.sql mssql:/ +sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "CREATE DATABASE onlyoffice;" +sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "GO" +sudo docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql + +
+ -
+ Change the parameters responsible for establishing a connection in
local.json
and switch Document Server to mssql: +
+sudo docker exec -it onlyoffice bash +nano /etc/onlyoffice/documentserver/local.json +{ + "services": { + "CoAuthoring": { + "sql": { + "type": "mssql", + "dbHost": "
", + "dbPort": "8080", + "dbName": "onlyoffice", + "dbUser": "sa", + "dbPass": "onlYoff1ce" +... +# supervisorctl restart all +
+