Skip to content

Commit c8809fc

Browse files
authored
Updating SQL Server image to Azure SQL Edge, updating SA env variables. (#23)
1 parent 6b63c86 commit c8809fc

File tree

87 files changed

+757
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+757
-49
lines changed

src/dotnet-aspire/.devcontainer/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SA_PASSWORD=P@ssw0rd!
1+
MSSQL_SA_PASSWORD=P@ssw0rd!

src/dotnet-aspire/.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"database": "master",
1717
"authenticationType": "SqlLogin",
1818
"user": "sa",
19-
"password": "${env:SA_PASSWORD}",
19+
"password": "${env:MSSQL_SA_PASSWORD}",
2020
"savePassword": true,
2121
"profileName": "LocalDev",
2222
"trustServerCertificate": true

src/dotnet-aspire/.devcontainer/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# (Adding the "ports" property to this file will not forward from a Codespace.)
2222

2323
db:
24-
image: mcr.microsoft.com/mssql/server:2022-latest
24+
image: mcr.microsoft.com/azure-sql-edge
2525
hostname: SQL-Library
2626
container_name: SQL-Library
2727
restart: unless-stopped

src/dotnet-aspire/.devcontainer/sql/postCreateCommand.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dacpac="false"
55

66
# Load SA_PASSWORD from .env file
77
export $(grep -v '^#' .devcontainer/.env | xargs)
8-
SApassword=$SA_PASSWORD
8+
SApassword=$MSSQL_SA_PASSWORD
99

1010
# Parameters
1111
dacpath=$1

src/dotnet-aspire/.vscode/tasks.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Verify database schema and data",
7+
"label": "1. Verify database schema and data",
88
"type": "shell",
99
"command": "code",
1010
"args": [
@@ -17,15 +17,15 @@
1717
}
1818
},
1919
{
20-
"label": "Build SQL Database project",
20+
"label": "2. Build SQL Database project",
2121
"type": "shell",
2222
"command": "dotnet build",
2323
"options": {
2424
"cwd": "${workspaceFolder}/database/Library"
2525
}
2626
},
2727
{
28-
"label": "Deploy SQL Database project",
28+
"label": "3. Publish SQL Database project",
2929
"type": "shell",
3030
"command": "bash",
3131
"args": [
@@ -34,12 +34,12 @@
3434
]
3535
},
3636
{
37-
"label": "Update .NET SDK",
37+
"label": "4. Update .NET SDK",
3838
"type": "shell",
3939
"command": "sudo dotnet workload update"
4040
},
4141
{
42-
"label": "Trust .NET HTTPS certificate",
42+
"label": "5. Trust .NET HTTPS certificate",
4343
"type": "shell",
4444
"command": "dotnet dev-certs https --trust"
4545
}

src/dotnet-aspire/NOTES.md

+1-1

src/dotnet-aspire/devcontainer-template.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet-aspire",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"name": ".NET with Aspire and Azure SQL",
55
"description": "A development environment for .NET Aspire and Azure SQL, enabling streamlined local development and testing.",
66
"documentationURL": "https://github.com/microsoft/azuresql-devcontainers/tree/main/src/dotnet-aspire",
@@ -12,8 +12,7 @@
1212
"description": ".NET version:",
1313
"proposals": [
1414
"8.0-bookworm",
15-
"8.0-jammy",
16-
"8.0-bullseye"
15+
"8.0-jammy"
1716
],
1817
"default": "8.0-bookworm"
1918
}

src/dotnet/.devcontainer/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SA_PASSWORD=P@ssw0rd!
1+
MSSQL_SA_PASSWORD=P@ssw0rd!

src/dotnet/.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"database": "master",
1717
"authenticationType": "SqlLogin",
1818
"user": "sa",
19-
"password": "${env:SA_PASSWORD}",
19+
"password": "${env:MSSQL_SA_PASSWORD}",
2020
"savePassword": true,
2121
"profileName": "LocalDev",
2222
"trustServerCertificate": true

src/dotnet/.devcontainer/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# (Adding the "ports" property to this file will not forward from a Codespace.)
2222

2323
db:
24-
image: mcr.microsoft.com/mssql/server:2022-latest
24+
image: mcr.microsoft.com/azure-sql-edge
2525
hostname: SQL-Library
2626
container_name: SQL-Library
2727
restart: unless-stopped

src/dotnet/.devcontainer/sql/postCreateCommand.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dacpac="false"
55

66
# Load SA_PASSWORD from .env file
77
export $(grep -v '^#' .devcontainer/.env | xargs)
8-
SApassword=$SA_PASSWORD
8+
SApassword=$MSSQL_SA_PASSWORD
99

1010
# Parameters
1111
dacpath=$1

src/dotnet/.vscode/tasks.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Verify database schema and data",
7+
"label": "1. Verify database schema and data",
88
"type": "shell",
99
"command": "code",
1010
"args": [
@@ -17,15 +17,15 @@
1717
}
1818
},
1919
{
20-
"label": "Build SQL Database project",
20+
"label": "2. Build SQL Database project",
2121
"type": "shell",
2222
"command": "dotnet build",
2323
"options": {
2424
"cwd": "${workspaceFolder}/database/Library"
2525
}
2626
},
2727
{
28-
"label": "Deploy SQL Database project",
28+
"label": "3. Publish SQL Database project",
2929
"type": "shell",
3030
"command": "bash",
3131
"args": [
@@ -34,7 +34,7 @@
3434
]
3535
},
3636
{
37-
"label": "Trust .NET HTTPS certificate",
37+
"label": "4. Trust .NET HTTPS certificate",
3838
"type": "shell",
3939
"command": "dotnet dev-certs https --trust"
4040
}

src/dotnet/NOTES.md

+1-1

src/dotnet/devcontainer-template.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"name": ".NET and Azure SQL",
55
"description": "A development environment for .NET and Azure SQL, enabling streamlined local development and testing.",
66
"documentationURL": "https://github.com/microsoft/azuresql-devcontainers/tree/main/src/dotnet",
@@ -12,8 +12,7 @@
1212
"description": ".NET version:",
1313
"proposals": [
1414
"8.0-bookworm",
15-
"8.0-jammy",
16-
"8.0-bullseye"
15+
"8.0-jammy"
1716
],
1817
"default": "8.0-bookworm"
1918
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SA_PASSWORD=P@ssw0rd!
1+
MSSQL_SA_PASSWORD=P@ssw0rd!

src/javascript-node/.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"database": "master",
1717
"authenticationType": "SqlLogin",
1818
"user": "sa",
19-
"password": "${env:SA_PASSWORD}",
19+
"password": "${env:MSSQL_SA_PASSWORD}",
2020
"savePassword": true,
2121
"profileName": "LocalDev",
2222
"trustServerCertificate": true

src/javascript-node/.devcontainer/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# (Adding the "ports" property to this file will not forward from a Codespace.)
2222

2323
db:
24-
image: mcr.microsoft.com/mssql/server:2022-latest
24+
image: mcr.microsoft.com/azure-sql-edge
2525
hostname: SQL-Library
2626
container_name: SQL-Library
2727
restart: unless-stopped

src/javascript-node/.devcontainer/sql/postCreateCommand.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dacpac="false"
55

66
# Load SA_PASSWORD from .env file
77
export $(grep -v '^#' .devcontainer/.env | xargs)
8-
SApassword=$SA_PASSWORD
8+
SApassword=$MSSQL_SA_PASSWORD
99

1010
# Parameters
1111
dacpath=$1

src/javascript-node/.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Verify database schema and data",
7+
"label": "1. Verify database schema and data",
88
"type": "shell",
99
"command": "code",
1010
"args": [
@@ -17,15 +17,15 @@
1717
}
1818
},
1919
{
20-
"label": "Build SQL Database project",
20+
"label": "2. Build SQL Database project",
2121
"type": "shell",
2222
"command": "dotnet build",
2323
"options": {
2424
"cwd": "${workspaceFolder}/database/Library"
2525
}
2626
},
2727
{
28-
"label": "Deploy SQL Database project",
28+
"label": "3. Publish SQL Database project",
2929
"type": "shell",
3030
"command": "bash",
3131
"args": [

src/javascript-node/NOTES.md

+1-1

src/javascript-node/devcontainer-template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "javascript-node",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"name": "Node.js and Azure SQL",
55
"description": "A development environment for Node.js and Azure SQL, enabling streamlined local development and testing.",
66
"documentationURL": "https://github.com/microsoft/azuresql-devcontainers/tree/main/src/javascript-node",

src/python/.devcontainer/.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SA_PASSWORD=P@ssw0rd!
1+
MSSQL_SA_PASSWORD=P@ssw0rd!

src/python/.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"database": "master",
1717
"authenticationType": "SqlLogin",
1818
"user": "sa",
19-
"password": "${env:SA_PASSWORD}",
19+
"password": "${env:MSSQL_SA_PASSWORD}",
2020
"savePassword": true,
2121
"profileName": "LocalDev",
2222
"trustServerCertificate": true

src/python/.devcontainer/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# (Adding the "ports" property to this file will not forward from a Codespace.)
2222

2323
db:
24-
image: mcr.microsoft.com/mssql/server:2022-latest
24+
image: mcr.microsoft.com/azure-sql-edge
2525
hostname: SQL-Library
2626
container_name: SQL-Library
2727
restart: unless-stopped

src/python/.devcontainer/sql/postCreateCommand.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dacpac="false"
55

66
# Load SA_PASSWORD from .env file
77
export $(grep -v '^#' .devcontainer/.env | xargs)
8-
SApassword=$SA_PASSWORD
8+
SApassword=$MSSQL_SA_PASSWORD
99

1010
# Parameters
1111
dacpath=$1

src/python/.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Verify database schema and data",
7+
"label": "1. Verify database schema and data",
88
"type": "shell",
99
"command": "code",
1010
"args": [
@@ -17,15 +17,15 @@
1717
}
1818
},
1919
{
20-
"label": "Build SQL Database project",
20+
"label": "2. Build SQL Database project",
2121
"type": "shell",
2222
"command": "dotnet build",
2323
"options": {
2424
"cwd": "${workspaceFolder}/database/Library"
2525
}
2626
},
2727
{
28-
"label": "Deploy SQL Database project",
28+
"label": "3. Publish SQL Database project",
2929
"type": "shell",
3030
"command": "bash",
3131
"args": [

src/python/NOTES.md

+1-1

src/python/devcontainer-template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "python",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"name": "Python and Azure SQL",
55
"description": "A development environment for Python and Azure SQL, enabling streamlined local development and testing.",
66
"documentationURL": "https://github.com/microsoft/azuresql-devcontainers/tree/main/src/python",

test/dotnet-aspire/Program.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
*-------------------------------------------------------------------------------------------------------------*/
55

6+
using System;
67
using Microsoft.AspNetCore.Hosting;
78
using Microsoft.AspNetCore.Builder;
89
using Microsoft.AspNetCore.Http;
@@ -42,7 +43,9 @@ public static void Main(string[] args)
4243
.UseKestrel()
4344
.UseUrls("http://0.0.0.0:8090")
4445
.Configure(app => app.Run(async context => {
45-
await context.Response.WriteAsync("The databases are: " + databaseNames);
46+
string responseText = "The databases are: " + databaseNames;
47+
Console.WriteLine(responseText); // Log to console
48+
await context.Response.WriteAsync(responseText); // Send to client
4649
}))
4750
.Build();
4851

test/dotnet-aspire/obj/Debug/net8.0/aspnetapp.AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: System.Reflection.AssemblyCompanyAttribute("aspnetapp")]
1414
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
1515
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
16-
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9c33fa073eb55d6469f3e41a4b798955f6fabd32")]
16+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6b63c86964252aae93d2225e26186cb031bdb14d")]
1717
[assembly: System.Reflection.AssemblyProductAttribute("aspnetapp")]
1818
[assembly: System.Reflection.AssemblyTitleAttribute("aspnetapp")]
1919
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d7386fb4f8f1c61d2bab9d0759d5573b8a8e5df3aa8bde9e86de07cabb306bf3
1+
c8dd5953b06c5d2c8d6068b708b6ac5b410ab5dcf27381795b860b17aa8a96e2
Binary file not shown.
Binary file not shown.

test/dotnet/Program.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
*-------------------------------------------------------------------------------------------------------------*/
55

6+
using System;
67
using Microsoft.AspNetCore.Hosting;
78
using Microsoft.AspNetCore.Builder;
89
using Microsoft.AspNetCore.Http;
@@ -42,7 +43,9 @@ public static void Main(string[] args)
4243
.UseKestrel()
4344
.UseUrls("http://0.0.0.0:8090")
4445
.Configure(app => app.Run(async context => {
45-
await context.Response.WriteAsync("The databases are: " + databaseNames);
46+
string responseText = "The databases are: " + databaseNames;
47+
Console.WriteLine(responseText); // Log to console
48+
await context.Response.WriteAsync(responseText); // Send to client
4649
}))
4750
.Build();
4851

147 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
70.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)