From e9941e9628e931bc07d41ac59b818a07f2b2de15 Mon Sep 17 00:00:00 2001 From: Flook Peter Date: Wed, 10 Jul 2024 19:05:07 +0800 Subject: [PATCH] Add in microsoft sql server (mssql) --- README.md | 1 + docker-compose.yaml | 16 ++++++++++++++++ run.sh | 1 + 3 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 2898c17..f33b3e7 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ POSTGRES_USER=my-user POSTGRES_PASSWORD=my-password ./run.sh postgres | Database | elasticsearch | ✅ | | Database | mariadb | ✅ | | Database | mongodb | ✅ | +| Database | mssql | ✅ | | Database | mysql | ✅ | | Database | neo4j | ✅ | | Database | postgres | ✅ | diff --git a/docker-compose.yaml b/docker-compose.yaml index 133c37c..55da7cd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -617,6 +617,22 @@ - "27017:27017" "volumes": - "./data/mongodb/persist:/data/db" + "mssql": + "container_name": "mssql" + "environment": + - "SA_PASSWORD=${MSSQL_PASSWORD:-yourStrong(!)Password}" + - "ACCEPT_EULA=Y" + "healthcheck": + "test": [ "CMD-SHELL", "mssql-health-check" ] + "timeout": "10s" + "interval": "10s" + "retries": 10 + "image": "mcr.microsoft.com/mssql/server:${MSSQL_VERSION:-2022-latest}" + "ports": + - "1433:1433" + "volumes": + - "./data/mssql/mssql-health-check:/usr/local/bin/mssql-health-check" +# - "./data/mssql/persist:/var/opt/mssql/data" "mysql": "command": ["/bin/bash", "-c", "/tmp/scripts/init.sh"] "container_name": "mysql-data" diff --git a/run.sh b/run.sh index 2ee15d3..6edec98 100755 --- a/run.sh +++ b/run.sh @@ -20,6 +20,7 @@ flight-sql='flight_sql_client --command Execute --host localhost --port 31337 -- mariadb='mariadb --user=${MARIADB_USER:-user} --password=${MARIADB_PASSWORD:-password}' mongodb-connect='mongosh mongodb://${MONGODB_USER:-root}:${MONGODB_PASSWORD:-root}@mongodb' mysql='mysql -u ${MYSQL_USER:-root} -p${MYSQL_PASSWORD:-root}' +mssql='/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P \"${MSSQL_PASSWORD:-yourStrong(!)Password}\"' neo4j='cypher-shell -u neo4j -p test' postgres='PGPASSWORD=${POSTGRES_PASSWORD:-postgres} psql -U${POSTGRES_USER:-postgres}' prefect-data='bash'