mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
also try
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -4,13 +4,7 @@ EXPOSE 80
|
|||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
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
|
WORKDIR /src
|
||||||
COPY ["yaflay.ru.csproj", "."]
|
COPY ["yaflay.ru.csproj", "."]
|
||||||
@@ -20,6 +14,13 @@ WORKDIR "/src/."
|
|||||||
RUN dotnet build "yaflay.ru.csproj" -c Release -o /app/build
|
RUN dotnet build "yaflay.ru.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
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
|
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
|
FROM base AS final
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using yaflay.ru;
|
using yaflay.ru;
|
||||||
public class Program
|
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;
|
var parse = (string name) => Environment.GetEnvironmentVariable(name) ?? null;
|
||||||
Startup.clientId = parse("clientId");
|
Startup.clientId = parse("clientId");
|
||||||
Startup.clientSecret = parse("clientSecret");
|
Startup.clientSecret = parse("clientSecret");
|
||||||
|
|||||||
Reference in New Issue
Block a user