You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@ Streamlined development environments for Azure SQL Database using Dev Containers
17
17
18
18
## Overview
19
19
20
-
In the quest to enhance local development for Azure SQL Database, this repository provides a comprehensive solution using the power of Dev Containers. These templates offer developers a seamless and efficient development environment, enabling them to build applications for Azure SQL Database with ease and confidence. Dev Containers can be utilized in any development environment, including the cloud, promoting consistency across teams and workflows.
20
+
In the quest to enhance local development for Azure SQL Database, this repository provides a comprehensive solution using the power of dev containers. These templates offer developers a seamless and efficient development environment, enabling them to build applications for Azure SQL Database with ease and confidence. Dev containers can be utilized in any development environment, including the cloud, promoting consistency across teams and workflows.
Our Dev Container templates simplify the development process by providing preconfigured environments that eliminate the need for manual setup. Developers can start coding immediately with all necessary tools and dependencies in place, using popular languages like `.NET` & `NET Aspire`, `Node.js`, `Python`.
24
+
Our development container templates for Azure SQL Database simplify the development process by providing preconfigured environments that eliminate the need for manual setup. Developers can start coding immediately with all necessary tools and dependencies in place, using popular languages like `.NET` & `NET Aspire`, `Node.js`, `Python`.
25
25
26
26
The local development environment mimics Azure SQL Database, allowing developers to manage data and test applications efficiently. Once ready, **GitHub Actions** automate the deployment process, transitioning seamlessly to **Azure Static Web Apps** and **Azure SQL Database**. This streamlined workflow enhances productivity, reduces setup time, and ensures consistency between local and production environments, helping developers deliver high-quality applications faster.
27
27
@@ -38,19 +38,19 @@ Developers face significant challenges in setting up efficient local development
38
38
39
39
### Addressing the Gap in Local Development Environments
40
40
41
-
We recognize the need for efficient local development environments tailored to Azure SQL Database. Our Dev Containers bridge this gap, enhancing developer experiences and fostering innovation within the Azure ecosystem. This initiative positions Azure SQL Database as a versatile and developer-centric platform.
41
+
We recognize the need for efficient local development environments tailored to Azure SQL Database. Our dev containers bridge this gap, enhancing developer experiences and fostering innovation within the Azure ecosystem. This initiative positions Azure SQL Database as a versatile and developer-centric platform.
42
42
43
43
### Accelerating Time-to-Market
44
44
45
-
Dev Containers streamline the development lifecycle, enabling developers to focus on coding and testing without the hassle of environment setup. The increased efficiency leads to faster iterations, higher-quality applications, and a reduced time-to-market for applications built on Azure SQL Database, giving businesses a competitive edge.
45
+
Dev containers streamline the development lifecycle, enabling developers to focus on coding and testing without the hassle of environment setup. The increased efficiency leads to faster iterations, higher-quality applications, and a reduced time-to-market for applications built on Azure SQL Database, giving businesses a competitive edge.
46
46
47
47
### Cost-Efficiency and Scalability
48
48
49
-
Local development with Dev Containers reduces cloud costs associated with development and testing in Azure environments. This optimization of resources improves cost-efficiency and scalability. Developers can transition seamlessly from local development to Azure environments, using the scalability and reliability of Azure SQL Database for production deployments without incurring unnecessary costs.
49
+
Local development with dev containers reduces cloud costs associated with development and testing in Azure environments. This optimization of resources improves cost-efficiency and scalability. Developers can transition seamlessly from local development to Azure environments, using the scalability and reliability of Azure SQL Database for production deployments without incurring unnecessary costs.
50
50
51
51
### Alignment with Cloud-Native Trends
52
52
53
-
Dev Containers support cloud-native development scenarios, aligning with modern application architectures and frameworks. Ensuring compatibility with Azure SQL Database and facilitates seamless deployment to Azure environments. By embracing cloud-native trends, we position Azure SQL Database as the platform of choice for modern, cloud-native applications, driving long-term adoption and revenue growth.
53
+
Dev containers support cloud-native development scenarios, aligning with modern application architectures and frameworks. Ensuring compatibility with Azure SQL Database and facilitates seamless deployment to Azure environments. By embracing cloud-native trends, we position Azure SQL Database as the platform of choice for modern, cloud-native applications, driving long-term adoption and revenue growth.
54
54
55
55
## Why Dev Containers, Docker, and VS Code?
56
56
@@ -62,7 +62,7 @@ Dev Containers, Docker, and VS Code are pivotal tools for modern developers:
62
62
63
63
## Value Proposition
64
64
65
-
Adopting Dev Containers for Azure SQL Database development offers several advantages:
65
+
Adopting dev containers for Azure SQL Database development offers several advantages:
66
66
67
67
-**Efficient Local Development**: Streamlines the setup process, saving time and reducing errors.
68
68
-**Cost-Efficiency**: Reduces cloud costs by enabling local development.
@@ -71,7 +71,7 @@ Adopting Dev Containers for Azure SQL Database development offers several advant
71
71
72
72
## Available Templates
73
73
74
-
This repository includes Dev Container templates for the following frameworks:
74
+
This repository includes Development Container Specifications (templates) for the following frameworks:
75
75
76
76
- .NET Aspire
77
77
- .NET 8
@@ -84,7 +84,7 @@ Each template comes with a preconfigured Azure SQL Database, making it easy to s
84
84
85
85
### Creating your own collection of templates
86
86
87
-
The [Dev Container Template specification](https://containers.dev/implementors/templates-distribution/#distribution) outlines a pattern for community members and organizations to self-author Templates in repositories they control.
87
+
The [Development Container Specification](https://containers.dev/implementors/templates-distribution/#distribution) outlines a pattern for community members and organizations to self-author Templates in repositories they control.
Copy file name to clipboardexpand all lines: src/dotnet-aspire/NOTES.md
+19-16
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
2
-
This Dev Container template enables you to effortlessly explore **.NET Aspire** and **Azure SQL**. In just a few simple steps, you can dive into the capabilities of these powerful technologies.
2
+
This dev container template enables you to effortlessly explore **.NET Aspire** and **Azure SQL**. In just a few simple steps, you can dive into the capabilities of these powerful technologies.
3
3
4
-
A **development container** (Dev Container for short) is a running [Docker](https://www.docker.com) container with a well-defined tool/runtime stack and its prerequisites. You can try out Dev Containers with **[GitHub Codespaces](https://github.com/features/codespaces)** or **[Visual Studio Code Dev Containers](https://aka.ms/vscode-remote/containers)**.
4
+
A **development container** (Dev Container for short) is a running [Docker](https://www.docker.com) container with a well-defined tool/runtime stack and its prerequisites. You can try out dev containers with **[GitHub Codespaces](https://github.com/features/codespaces)** or **[Visual Studio Code Dev Containers](https://aka.ms/vscode-remote/containers)**.
5
5
6
6
To learn more details about all the Azure SQL Database templates, you can explore the template repository at [aka.ms/azuresql-devcontainers](https://aka.ms/azuresql-devcontainers). This repository includes comprehensive information for each Azure SQL template. To learn more about Dev Containers, visit [containers.dev](https://containers.dev/) website, where you find a diverse range of templates.
7
7
8
-
> **Note:** If you already have a Codespace or Dev Container, you can jump to the [About this template](#about-this-template) section.
8
+
> **Note:**
9
+
> If you already have a Codespace or Dev Container, you can jump to the [About this template](#about-this-template) section.
9
10
10
11
## Setting up the development container
11
12
@@ -22,44 +23,45 @@ For more info, check out the [GitHub documentation](https://docs.github.com/en/f
22
23
23
24
Follow these steps to open this sample in a container using the VS Code Dev Containers extension:
24
25
25
-
1. If you're using a Dev Container for the first time, ensure your system meets the prerequisites in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
26
+
1. If you're using a dev container for the first time, ensure your system meets the prerequisites in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
26
27
2. To use this repository, you can either open the repository in an isolated Docker volume:
27
28
- Press `F1` or `Ctrl+Shift+P` to open the command palette.
28
29
- Select the **Dev Containers: New Dev Container** command.
29
-
- Select the desired Dev Container template for Azure SQL Database, typing `*Azure SQL*`.
30
+
- Select the desired dev container template for Azure SQL Database, typing `*Azure SQL*`.
30
31
- Select the **.NET with Aspire and Azure SQL (dotnet-aspire)** template
31
32
- Wait for the container to build.
32
33
- Visual Studio Code builds the container based on the selected configuration.
33
34
- The build process might take a few minutes the first time.
34
35
- Subsequent builds are faster.
35
-
- Once the container is built, the repository opens in the Dev Container.
36
+
- Once the container is built, the repository opens in the dev container.
36
37
37
-
> **Note:** Under the hood, this will use the **Dev Containers: Clone Repository in Container Volume...** command to clone the source code in a Docker volume instead of the local filesystem. [Volumes](https://docs.docker.com/storage/volumes/) are the preferred mechanism for persisting container data.
38
+
> **Note:**
39
+
> Under the hood, this will use the **Dev Containers: Clone Repository in Container Volume...** command to clone the source code in a Docker volume instead of the local filesystem. [Volumes](https://docs.docker.com/storage/volumes/) are the preferred mechanism for persisting container data.
38
40
39
41
### About this template
40
42
41
-
This Dev Container includes a preconfigured database, tailored for use with the Aspire component. This database serves as a foundation for demonstrating how the Aspire component interacts with Azure SQL.
43
+
This dev container includes a preconfigured database, tailored for use with the Aspire component. This database serves as a foundation for demonstrating how the Aspire component interacts with Azure SQL.
42
44
43
-
This template creates two containers, one for the Dev Container that includes .NET and Aspire, and one for Microsoft SQL Server. You're connected to the Ubuntu, and from within that container, the MS SQL container is available on **`localhost`** port 1433. The Dev Container also includes supporting scripts in the `.devcontainer/sql` folder used to configure the `Library` sample database.
45
+
This template creates two containers, one for the dev container that includes .NET and Aspire, and one for Microsoft SQL Server. You're connected to the Ubuntu, and from within that container, the MS SQL container is available on **`localhost`** port 1433. The dev container also includes supporting scripts in the `.devcontainer/sql` folder used to configure the `Library` sample database.
44
46
45
-
The SQL container is deployed from the latest developer edition of Microsoft SQL 2022. The database are made available directly in the Codespace/VS Code through the MSSQL extension with a connection labeled **LocalDev**. The default `sa` user password is set using the .devcontainer/.env file. In `.devcontainer/docker-compose.yml`, port `1433`is mapped as the default SQL Server port.
47
+
The SQL container is deployed from the latest developer edition of Microsoft SQL 2022. The database(s) are made available directly in the Codespace/VS Code through the MSSQL extension with a connection labeled **LocalDev**. The default sa user password is set using the `.devcontainer/.env` file. The default SQL port is mapped to port 1433 in `.devcontainer/docker-compose.yml`.
46
48
47
49
.NET Aspire is a cutting-edge framework crafted for developing cloud-native applications, with a primary focus on containerized environments. Aspire, built with .NET Core, empowers developers to architect scalable and resilient applications optimized for cloud deployment.
48
50
49
-
**Note:**
50
-
While the SQL Server container employs a standard version of SQL Server, all database development within this Dev Container can be validated for Azure SQL Database using the SQL Database Project. The SQL Database project is preconfigured with the target platform set as Azure SQL Database.
51
+
> **Note:**
52
+
> While the SQL Server container employs a standard version of SQL Server, all database development within this dev container can be validated for Azure SQL Database using the SQL Database Project. The SQL Database project is preconfigured with the target platform set as Azure SQL Database.
51
53
52
54
#### Visual Code Tasks
53
55
54
-
This Dev Container template includes multiple tasks that can help with common actions. You can access these tasks by opening the Command Palette in VS Code. Here's how:
56
+
This dev container template includes multiple tasks that can help with common actions. You can access these tasks by opening the Command Palette in VS Code. Here's how:
55
57
56
58
1. To open the Command Palette, press <kbd>F1</kbd> or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>.
57
59
2. Type "Run Task" and select "Tasks: Run Task".
58
60
3. Choose the task you want to run from the list.
59
61
60
62
##### Verify database schema and data
61
63
62
-
This task opens the `verifyDatabase.sql` file in your workspace and executes the SQL query using the `ms-mssql.mssql` extension. This task is optional however it can help you to become familiar with the sample `Library` database tables and data included in this Dev Container template.
64
+
This task opens the `verifyDatabase.sql` file in your workspace and executes the SQL query using the `ms-mssql.mssql` extension. This task is optional however it can help you to become familiar with the sample `Library` database tables and data included in this dev container template.
63
65
64
66
##### Build SQL Database project
65
67
@@ -111,7 +113,7 @@ The `postCreateCommand.sh` script handles the database deployment by performing
111
113
112
114
#### Using the SQL Database Projects Extension
113
115
114
-
You can use the SQL Database Projects extension to deploy the database schema. The Library.sqlproj project is located in the database/Library folder and can be built using the Build SQL Database project task. The output .dacpac files should be placed in the ./bin/Debug folder for deployment.
116
+
You can use the SQL Database Projects extension to deploy the database schema. The `Library.sqlproj` project is located in the `database/Library` folder and can be built using the Build SQL Database project task. The output .dacpac files should be placed in the `./bin/Debug` folder for deployment.
115
117
116
118
### Adding another service
117
119
@@ -131,6 +133,7 @@ This project uses the `5000` and `5001` ports for .NET Aspire, and the port `143
131
133
```json
132
134
"forwardPorts": [5000, 5001, 1433]
133
135
```
134
-
> **Note:** You can add additional ports to this list as needed.
136
+
> **Note:**
137
+
> You can add additional ports to this list as needed.
135
138
136
139
The `ports` property in `docker-compose.yml` [publishes](https://docs.docker.com/config/containers/container-networking/#published-ports) rather than forwards the port. This configuration couldn't work in a cloud environment like Codespaces and applications need to listen to `*` or `0.0.0.0` for the application to be accessible externally. Fortunately the `forwardPorts` property doesn't have this limitation.
0 commit comments