From 61791f148de694f999437ec23827335ff9a97fbe Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Tue, 19 Dec 2023 17:47:28 +0200 Subject: [PATCH] Adding support for MS SQL Server to docker-compose (#5616) --- src/docker-compose/dc.sh | 5 ++- src/docker-compose/docker-compose-mssql.yml | 38 +++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/docker-compose/docker-compose-mssql.yml diff --git a/src/docker-compose/dc.sh b/src/docker-compose/dc.sh index f9ffe34e1c..24edf6f394 100755 --- a/src/docker-compose/dc.sh +++ b/src/docker-compose/dc.sh @@ -8,7 +8,7 @@ SCDIR=$(realpath $SCDIR) if [ "$1" == "" ]; then echo "Usage is: "${BASH_SOURCE[0]}" [compose-command] [options] [flags] [--no-wait]" echo "Where:" - echo " database: is one of mariadb, mysql or postgres" + echo " database: is one of mariadb, mysql, mssql or postgres" echo " broker: is on of kafka or rabbitmq" echo " compose-command: One of up,down,rm,kill,stop,start,run,restart,pull,pause,create,build. Default is up." echo " options: one or more of ssl, zipkin, prometheus, influxdb, wavefront, ssl, dood, debug-dataflow, debug-skipper" @@ -34,6 +34,9 @@ while [ "$1" != "" ]; do "mysql") DATABASE=mysql ;; + "mssql") + DATABASE=mssql + ;; "maria" | "mariadb") DATABASE=mariadb ;; diff --git a/src/docker-compose/docker-compose-mssql.yml b/src/docker-compose/docker-compose-mssql.yml new file mode 100644 index 0000000000..562869e128 --- /dev/null +++ b/src/docker-compose/docker-compose-mssql.yml @@ -0,0 +1,38 @@ +version: '3' + +# Reconfigures the default docker-compose.yml to replace MariaDB by Postgres +# Usage: docker-compose -f ./docker-compose.yml -f ./docker-compose-postgres.yml up +services: + + mssql: + image: mcr.microsoft.com/mssql/server:2019-latest + container_name: dataflow-mssql + restart: always + privileged: true + environment: + LANG: en_US.utf8 + LC_ALL: en_US.utf8 + JDK_JAVA_OPTIONS: '-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8' + MSSQL_SA_PASSWORD: 'MSSqlServer_RootPassword1' + ACCEPT_EULA: 'Y' + expose: + - 1443 + ports: + - '1443:1443' + + dataflow-server: + environment: + - SPRING_DATASOURCE_URL=jdbc:sqlserver://mssql;encrypt=true;trustServerCertificate=true + - SPRING_DATASOURCE_USERNAME=sa + - SPRING_DATASOURCE_PASSWORD=MSSqlServer_RootPassword1 + - SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver + depends_on: + - mssql + skipper-server: + environment: + - SPRING_DATASOURCE_URL=jdbc:sqlserver://mssql;encrypt=true;trustServerCertificate=true + - SPRING_DATASOURCE_USERNAME=sa + - SPRING_DATASOURCE_PASSWORD=MSSqlServer_RootPassword1 + - SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriver + depends_on: + - mssql