mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
pass MSSQL_SA_PASSWORD to mssql container, and add MSSQL_HOST
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2969 GitOrigin-RevId: 42e4cdf36306148ea34ea19fd42ce5048a38dbbc
This commit is contained in:
parent
3166010ac1
commit
f1cbe4e72b
@ -14,9 +14,10 @@ else
|
||||
MSSQL_PORT=21433
|
||||
fi
|
||||
|
||||
MSSQL_HOST=127.0.0.1
|
||||
MSSQL_PASSWORD=hasuraMSSQL1
|
||||
MSSQL_CONTAINER_NAME="hasura-dev-mssql-$MSSQL_PORT"
|
||||
MSSQL_CONN_STR="DRIVER={ODBC Driver 17 for SQL Server};SERVER=127.0.0.1,$MSSQL_PORT;Uid=sa;Pwd=$MSSQL_PASSWORD;"
|
||||
MSSQL_CONN_STR="DRIVER={ODBC Driver 17 for SQL Server};SERVER=$MSSQL_HOST,$MSSQL_PORT;Uid=sa;Pwd=$MSSQL_PASSWORD;"
|
||||
MSSQL_DOCKER="docker exec -it $MSSQL_CONTAINER_NAME sqlcmd -S localhost -U sa -P $MSSQL_PASSWORD"
|
||||
|
||||
if [[ `uname -m` == 'arm64' ]]; then
|
||||
@ -36,7 +37,8 @@ function mssql_launch_container(){
|
||||
docker run --name $MSSQL_CONTAINER_NAME \
|
||||
--platform "$MSSQL_PLATFORM" \
|
||||
-e ACCEPT_EULA=1 \
|
||||
-p 127.0.0.1:"$MSSQL_PORT":1433 -d "$MSSQL_CONTAINER_IMAGE"
|
||||
-e "MSSQL_SA_PASSWORD=$MSSQL_PASSWORD" \
|
||||
-p $MSSQL_HOST:"$MSSQL_PORT":1433 -d "$MSSQL_CONTAINER_IMAGE"
|
||||
}
|
||||
|
||||
function mssql_wait {
|
||||
|
@ -127,4 +127,4 @@ to it from `graphql-engine` which runs on a different computer. Currently, mssql
|
||||
`scripts/dev.sh mssql` will only be exposed to the machine it is run on.
|
||||
|
||||
To change that and expose it to other machines as well, we need to edit `scripts/containers/mssql.sh` and change
|
||||
all instances of `127.0.0.1` to the external IP of the machine.
|
||||
the `MSSQL_HOST` variable to the external IP of the machine.
|
||||
|
Loading…
Reference in New Issue
Block a user