Skip to content

Commit

Permalink
Fixed up demo shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sanagama committed Oct 22, 2017
1 parent 9df7f51 commit 6a4ccaf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Launch a ```Terminal``` window and type the following commands to run SQL Server

```
cd ~/mssql-restapi
cat ./scripts/1-docker-mssql.sh
./scripts/1-docker-mssql.sh
cat ./scripts/1-docker-pull-mssql.sh
./scripts/1-docker-pull-mssql.sh
```

### Step 3: Restore sample databases
Expand All @@ -94,8 +94,8 @@ Type the following commands in the ```Terminal``` window to restore a couple of

```
cd ~/mssql-restapi
cat ./scripts/2-docker-create-db.sh
./scripts/2-docker-create-db.sh
cat ./scripts/3-docker-create-db.sh
./scripts/3-docker-create-db.sh
```

### Step 4: Run the REST API web app locally
Expand Down
3 changes: 2 additions & 1 deletion scripts/1-docker-mssql.sh → scripts/1-docker-pull-mssql.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Sample script to pull and run SQL Server 2017 in Docker
# Pull and run SQL Server 2017 in Docker
# The directory ~/mssql-restapi/backups is mounted as /backups in the Docker container
#
set -x
Expand All @@ -14,3 +14,4 @@ docker run --name 'sqldocker' --cap-add SYS_PTRACE \
-e 'MSSQL_PID=Developer' \
-p 1433:1433 \
-d microsoft/mssql-server-linux:2017-GA

14 changes: 14 additions & 0 deletions scripts/2-docker-pull-restapi-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

#
# Pull and run sanagama/mssql-restapi and connect to SQL Server 2017 running locally in Docker
#
# Uses default values for MSSQL_PORT, MSSQL_DATABASE, MSSQL_USERNAME and MSSQL_PASSWORD
# as described here: https://github.com/sanagama/mssql-restapi#environment-variables
#
set -x

docker pull sanagama/mssql-restapi

docker run --name 'mssql-restapi' -it -p 5000:5000 -e MSSQL_HOST=`hostname` sanagama/mssql-restapi

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Script to create sample databases (Adventureworks, BollywoodDB & WideWorldImporters) in SQL Server 2017 in Docker
# Create sample databases (Adventureworks, BollywoodDB & WideWorldImporters) in SQL Server 2017 in Docker
#
set -x

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Script to pull and run sanagama/mssql-restapi in Docker and connect to an Azure SQL Database.
# Pull and run sanagama/mssql-restapi in Docker and connect to an Azure SQL Database.
#
# Replace the following before running this script:
# <server>: Azure SQL DB logical server name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Script to run Web API app and connect to an Azure SQL Database.
# Run mssql-restapi locally with .NET Core 2.0 and connect to an Azure SQL Database.
#
# Replace the following before running this script:
# <server>: Azure SQL DB logical server name
Expand Down

0 comments on commit 6a4ccaf

Please sign in to comment.