mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2025-12-09 20:19:32 +02:00
also try
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -4,13 +4,7 @@ EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
ENV CLIENTID 123
|
||||
ENV CLIENTSECRET aAbB
|
||||
ENV REDIRECTURL http://example.org/
|
||||
ENV PSQL_HOST localhost
|
||||
ENV PSQL_USER root
|
||||
ENV PSQL_PASSWORD root
|
||||
ENV PSQL_DATABASE database
|
||||
|
||||
|
||||
WORKDIR /src
|
||||
COPY ["yaflay.ru.csproj", "."]
|
||||
@@ -20,6 +14,13 @@ WORKDIR "/src/."
|
||||
RUN dotnet build "yaflay.ru.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ENV CLIENTID 123
|
||||
ENV CLIENTSECRET aAbB
|
||||
ENV REDIRECTURL http://example.org/
|
||||
ENV PSQL_HOST localhost
|
||||
ENV PSQL_USER root
|
||||
ENV PSQL_PASSWORD root
|
||||
ENV PSQL_DATABASE database
|
||||
RUN dotnet publish "yaflay.ru.csproj" -c Release -o /app/publish /p:UseAppHost=false;redirectUrl=$CLIENTID;clientId=;clientSecret=$CLIENTSECRET;Host=$PSQL_HOST;Username=$PSQL_USER;Password=$PSQL_PASSWORD;Database=$PSQL_DATABASE
|
||||
|
||||
FROM base AS final
|
||||
|
||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using yaflay.ru;
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
Console.WriteLine(args[0]);
|
||||
var parse = (string name) => Environment.GetEnvironmentVariable(name) ?? null;
|
||||
Startup.clientId = parse("clientId");
|
||||
Startup.clientSecret = parse("clientSecret");
|
||||
|
||||
Reference in New Issue
Block a user