diff --git a/src/site/markdown/install/mssql.md b/src/site/markdown/install/mssql.md new file mode 100644 index 00000000..95ea1028 --- /dev/null +++ b/src/site/markdown/install/mssql.md @@ -0,0 +1,125 @@ +# How to Run Imixs-Office-Workflow with Microsoft SQL Server + +Imixs-Office-Workflow can be used with databases from different vendors. In the default configuration, a PostgreSQL database is used. +The following section shows how to connect the Imixs Office workflow running under Wildfly with a Microsodft SQL Server. + +## Install the Driver Module + +First you need to ensure that you have configured a driver module. Create the following directory structure + +``` +├── modules +│   └── com +│   └── microsoft +│   └── sqlserver +│   └── jdbc +│   └── main +│   ├── module.xml +│   └── mssql-jdbc-12.8.1.jre11.jar +``` + +The `/main` directory includes the mssql jdbc driver and a module.xml file with the following content: + +```xml + + + + + + + +``` + +Now you can add the Driver together with the datasource configuration for Imixs-Office-Workflow into your standalone.xml file from Wildfly: + +```xml + .... + + + .... + + + ${env.MSSQL_CONNECTION} + mssql + com.microsoft.sqlserver.jdbc.SQLServerDriver + + ${env.MSSQL_USER} + ${env.MSSQL_PASSWORD} + + + select 1 + + + + + .... + + + com.microsoft.sqlserver.jdbc.SQLServerDriver + + + + ..... + +``` + + +The datasource is connected with the installed JDBC driver and uses environment variables to connect to your MS SQL server. +Here is an example how to configure the datasource in your `docker-compose.yaml` file: + +``` +version: "3.6" +services: + + db: + image: mcr.microsoft.com/mssql/server:2022-preview-ubuntu-22.04 + environment: + ACCEPT_EULA: "Y" + MSSQL_SA_PASSWORD: "yourStrong12345Password" + volumes: + - dbdata:/var/lib/mssql/data + + app: + image: imixs/imixs-documents:2.1.0 + depends_on: + - db + environment: + MSSQL_CONNECTION: "jdbc:sqlserver://db:1433;databaseName=office;encrypt=true;trustServerCertificate=true" + MSSQL_USER: "sa" + MSSQL_PASSWORD: "yourStrong12345Password" + TZ: "Europe/Berlin" + ports: + - "8080:8080" + - "8787:8787" + volumes: + - ./docker/configuration/standalone-mssql.xml:/opt/jboss/wildfly/standalone/configuration/standalone.xml + - ./docker/configuration/modules/com/microsoft/:/opt/jboss/wildfly/modules/com/microsoft/ + +``` + +We use the volumes mapping here to inject the modules and standalone.xml file into the container. + + +## Setup Microsoft SQL Server + +In this example we use a preview version of Microsoft SQL running in a container. +You can test your Microsoft SLQ Server and create the database `office` using commandline tool `sqlcmd` + +``` +$ docker exec -it office-goslar-db-1 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong12345Password +``` + +From the commandline shell you can create the database with: + +``` +1> CREATE DATABASE office +2> GO +``` + +Now you can start Imixs-Office-Workflow connecting to your local Microsoft SQL Server. + +In general we recommend to use a Open Source Database instead of the proprietary Microsoft SQL Server. + + diff --git a/src/site/site.xml b/src/site/site.xml index b7476be9..63067af3 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -16,6 +16,7 @@ +