Skip to content

Commit

Permalink
MSSQL config workaround re microsoft/mssql-docker#2
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Mar 5, 2022
1 parent bfa77ab commit 2b88674
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ services:

equinox-mssql:
container_name: equinox-mssql
image: microsoft/mssql-server-linux:2017-latest
restart: unless-stopped
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- "1433:1433"
- 1433:1433
volumes:
- ~/apps/mssql/data:/var/lib/mssqlql/data
environment:
- SA_PASSWORD=!Passw0rd
- ACCEPT_EULA=Y
- SA_PASSWORD=mssql1Ipw

equinox-mysql:
container_name: equinox-mysql
Expand Down
10 changes: 9 additions & 1 deletion tests/Equinox.EventStore.Integration/StoreIntegration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ open Equinox.SqlStreamStore
open Equinox.SqlStreamStore.MsSql

let connectToLocalStore (_ : ILogger) =
Connector(sprintf "Server=localhost,1433;User=sa;Password=!Passw0rd;Database=test",autoCreate=true).Establish()
Connector(sprintf "Server=localhost,1433;User=sa;Password=mssql1Ipw;Database=test",autoCreate=true).Establish()

(* WORKAROUND FOR https://github.com/microsoft/mssql-docker/issues/2#issuecomment-1059819719
AFTER `docker compose up`, run:
docker exec -it equinox-mssql /opt/mssql-tools/bin/sqlcmd \
-S localhost -U sa -P mssql1Ipw \
-Q "CREATE database test"
*)

type Context = SqlStreamStoreContext
type Category<'event, 'state, 'context> = SqlStreamStoreCategory<'event, 'state, 'context>
Expand Down

0 comments on commit 2b88674

Please sign in to comment.