Skip to content

Commit

Permalink
Merge pull request #1 from Azure-Samples/downgrade-net-7
Browse files Browse the repository at this point in the history
Downgrade to .NET 7
  • Loading branch information
seesharprun authored Oct 11, 2023
2 parents e57f781 + ce0edf5 commit 6a00296
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ARG VARIANT=8.0
ARG VARIANT=7.0
FROM mcr.microsoft.com/dotnet/sdk:${VARIANT}
ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
validate-dotnet:
name: Validate .NET solution
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:8.0
container: mcr.microsoft.com/dotnet/sdk:7.0
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions infra/app/web.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module appServiceSite '../core/web/app-service/site.bicep' = {
'azd-service-name': serviceTag
})
runtimeName: 'dotnetcore' // ASP.NET
runtimeVersion: '8.0' // .NET 8 (LTS)
runtimeVersion: '7.0' // .NET 7 (LTS)
enableSystemAssignedManagedIdentity: true // Create system-assigned managed identity
}
}
Expand All @@ -49,7 +49,7 @@ module appServiceConfig '../core/web/app-service/config.bicep' = {
appSettings: {
SCM_DO_BUILD_DURING_DEPLOYMENT: string(false)
ENABLE_ORYX_BUILD: string(true)
WEBSITES_PORT: '8080'
WEBSITES_PORT: '80'
AZURE_COSMOS_DB_NOSQL_ENDPOINT: databaseAccountEndpoint
}
}
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ When you are finished, you will have a fully functional web application deployed
The following prerequisites are required to use this application. Please ensure that you have them all installed locally.

- [Azure Developer CLI](https://aka.ms/azd-install)
- [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0)
- [.NET SDK 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)

### Quickstart

Expand Down Expand Up @@ -49,7 +49,7 @@ Here's a high level architecture diagram that illustrates these components. Noti
%%{ init: { 'theme': 'base', 'themeVariables': { 'background': '#243A5E', 'primaryColor': '#50E6FF', 'primaryBorderColor': '#243A5E', 'tertiaryBorderColor': '#50E6FF', 'tertiaryColor': '#243A5E', 'fontFamily': 'Segoe UI', 'lineColor': '#FFFFFF', 'primaryTextColor': '#243A5E', 'tertiaryTextColor': '#FFFFFF' } }}%%
flowchart TB
subgraph app-service[Azure App Service]
app-framework([.NET 8 - Blazor])
app-framework([.NET 7 - Blazor])
end
subgraph cosmos-db[Azure Cosmos DB]
subgraph database-cosmicworks[Database: cosmicworks]
Expand Down
2 changes: 1 addition & 1 deletion src/web/Cosmos.Samples.NoSQL.Quickstart.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>65c85440-31fd-4394-ae83-614ffddbb71f</UserSecretsId>
Expand Down
11 changes: 4 additions & 7 deletions src/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["web/Cosmos.Samples.NoSQL.Quickstart.Web.csproj", "web/"]
Expand Down

0 comments on commit 6a00296

Please sign in to comment.