From 7ecddbca906d0a23a4aa99305fe912165a9afe94 Mon Sep 17 00:00:00 2001 From: Maxim Samsonov Date: Sun, 14 Apr 2024 03:31:42 +0300 Subject: [PATCH] First deployment (#3) --- dkgNode/Program.cs | 2 +- dkgServiceNode/Program.cs | 2 +- dkgServiceNode/dkgServiceNode.csproj | 6 ++++++ docker-compose-ghrc.yml | 10 ++++++---- docker-compose.yml | 23 +++++++++++++---------- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/dkgNode/Program.cs b/dkgNode/Program.cs index 0ec3207..5edcad8 100644 --- a/dkgNode/Program.cs +++ b/dkgNode/Program.cs @@ -15,7 +15,7 @@ Host = Environment.GetEnvironmentVariable("DKG_NODE_SERVER_GRPC_HOST") ?? "localhost", NiceName = Environment.GetEnvironmentVariable("DKG_NODE_SERVER_NAME") }; -var serviceNodeUrl = Environment.GetEnvironmentVariable("DKG_SERVICE_NODE_URL") ?? "http://localhost:8080"; +var serviceNodeUrl = Environment.GetEnvironmentVariable("DKG_SERVICE_NODE_URL") ?? "https://localhost:8081"; var loggerFactory = app.Services.GetRequiredService(); var logger = loggerFactory.CreateLogger("DkgNode"); diff --git a/dkgServiceNode/Program.cs b/dkgServiceNode/Program.cs index 1dcc723..cefe862 100644 --- a/dkgServiceNode/Program.cs +++ b/dkgServiceNode/Program.cs @@ -49,7 +49,7 @@ app.UseMiddleware(); -// app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); diff --git a/dkgServiceNode/dkgServiceNode.csproj b/dkgServiceNode/dkgServiceNode.csproj index e3df03f..ca3d747 100644 --- a/dkgServiceNode/dkgServiceNode.csproj +++ b/dkgServiceNode/dkgServiceNode.csproj @@ -26,4 +26,10 @@ + + + Always + + + diff --git a/docker-compose-ghrc.yml b/docker-compose-ghrc.yml index 368487e..c923003 100644 --- a/docker-compose-ghrc.yml +++ b/docker-compose-ghrc.yml @@ -6,12 +6,14 @@ services: image: ghcr.io/maxirmx/dkg-service-node:latest environment: - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_HTTP_PORTS=8081 -# - ASPNETCORE_HTTPS_PORTS=8081 + - ASPNETCORE_HTTP_PORTS=8080 + - ASPNETCORE_HTTPS_PORTS=8081 + - Kestrel__Certificates__Default__Password_FILE=/etc/dkg/s.pwd ports: - "8080:8080" -# - "8081:8081" -# volumes: + - "8081:8081" + volumes: + - /etc/dkg:/etc/dkg # - ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro # - ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro depends_on: diff --git a/docker-compose.yml b/docker-compose.yml index 8eabf7b..ade2862 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,12 +11,16 @@ services: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_HTTP_PORTS=8080 - ASPNETCORE_HTTPS_PORTS=8081 + - ASPNETCORE_Kestrel__Certificates__Default__Path=/etc/dkg/s.pfx +# - ASPNETCORE_Kestrel__Certificates__Default__Password= +# - ASPNETCORE_Kestrel__Certificates__Default__Password_FILE=/etc/dkg/s.pwd ports: - "8080:8080" - "8081:8081" volumes: - - ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro - - ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro + - /etc/dkg:/etc/dkg +# - ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro +# - ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro depends_on: - dkgservice_db @@ -110,14 +114,13 @@ services: - POSTGRES_DB=dkgservice volumes: - pgdata:/var/lib/postgresql - - adminer: - container_name: adminer - image: adminer - restart: always - ports: - - 8082:8080 + +# adminer: +# container_name: adminer +# image: adminer +# restart: always +# ports: +# - 8082:8080 volumes: pgdata: {} -