initial
This commit is contained in:
commit
646805c693
7 changed files with 48 additions and 0 deletions
6
dotnet/.dockerignore
Normal file
6
dotnet/.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.git
|
||||
.gitignore
|
||||
obj
|
||||
bin
|
||||
Properties
|
||||
appsettings*
|
||||
4
dotnet/.gitignore
vendored
Normal file
4
dotnet/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
obj
|
||||
bin
|
||||
Properties
|
||||
appsettings*
|
||||
8
dotnet/Dockerfile
Normal file
8
dotnet/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
|
||||
WORKDIR /src
|
||||
COPY *.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
COPY . .
|
||||
CMD ["dotnet", "run"]
|
||||
9
dotnet/Program.cs
Normal file
9
dotnet/Program.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var builder = WebApplication.CreateBuilder(args);
|
||||
var app = builder.Build();
|
||||
|
||||
var port = Environment.GetEnvironmentVariable("PORT") ?? "5000";
|
||||
var url = $"http://0.0.0.0:{port}";
|
||||
|
||||
app.MapGet("", () => "Hello World!");
|
||||
|
||||
app.Run(url);
|
||||
9
dotnet/dotnet.csproj
Normal file
9
dotnet/dotnet.csproj
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue