diff --git a/.vscode/launch.json b/.vscode/launch.json
index 3a681a7..9e17bd2 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,26 +1,34 @@
{
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
- "version": "0.2.0",
- "configurations": [
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
{
- "name": ".NET Core Launch (console)",
- "type": "coreclr",
- "request": "launch",
- "preLaunchTask": "build",
- "program": "${workspaceFolder}/Server/bin/Debug/netcoreapp2.2/Server.dll",
- "args": [],
- "cwd": "${workspaceFolder}",
- "console": "internalConsole",
- "stopAtEntry": false,
- "internalConsoleOptions": "openOnSessionStart"
+ "name": ".NET Core Launch (web)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/bin/Debug/net8.0/Server.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ "stopAtEntry": false,
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
+ },
+ "env": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "sourceFileMap": {
+ "/Views": "${workspaceFolder}/Views"
+ }
},
{
- "name": ".NET Core Attach",
- "type": "coreclr",
- "request": "attach",
- "processId": "${command:pickProcess}"
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
}
- ]
+ ]
}
diff --git a/Dockerfile b/Dockerfile
index d2ed5ac..96877bc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,10 @@
# Build stage
#############
-FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
+# Learn about building .NET container images:
+# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+ARG TARGET_ARCH
WORKDIR /src
COPY . "/src"
@@ -17,7 +20,7 @@ COPY Server/public /app/public
# Application stage
###################
-FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
+FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine
WORKDIR /app
COPY --from=build /app .
diff --git a/Makefile b/Makefile
index 54f31f0..a1ba784 100644
--- a/Makefile
+++ b/Makefile
@@ -9,25 +9,25 @@ build: $(C_SHARP_SOURCES) $(CS_HTML_SOURCES)
dotnet build
.PHONY: build
+.PHONY: run
run: build
dotnet run --project Server
-.PHONY: run
+.PHONY: docker
docker:
docker build -t party-server .
-.PHONY: docker
+.PHONY: docker-test
docker-test:
docker-compose up -d --renew-anon-volumes
-.PHONY: docker-test
+.PHONY: publish
publish: docker
docker tag party-server registry.heroku.com/chances-party-staging/web
heroku container:push web -a chances-party-staging
heroku container:release web -a chances-party-staging
-.PHONY: publish
+.PHONY: clean
clean:
dotnet clean
rm -rf Server/bin Server/obj
-.PHONY: clean
diff --git a/ModelsScaffold/ModelsScaffold.csproj b/ModelsScaffold/ModelsScaffold.csproj
index 98e2346..1b13fe4 100644
--- a/ModelsScaffold/ModelsScaffold.csproj
+++ b/ModelsScaffold/ModelsScaffold.csproj
@@ -1,7 +1,7 @@
Exe
- netcoreapp3.1
+ net8.0
7.3
@@ -10,4 +10,4 @@
-
\ No newline at end of file
+
diff --git a/Server/Server.csproj b/Server/Server.csproj
index 1ecca34..1d986a9 100644
--- a/Server/Server.csproj
+++ b/Server/Server.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net8.0
$(MSBuildThisFileDirectory)/..