From 6cd36e2c5e049441bb44eb04d637e408a9fb173a Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 8 May 2019 21:16:41 +0200 Subject: [PATCH] web: add Docker support for web --- Dockerfile | 6 ++++-- docker-compose.yml | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e5014fd..5f7fe289 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine WORKDIR /app -COPY PluralKit/ PluralKit.csproj /app/ +COPY PluralKit.Bot /app/PluralKit.Bot +COPY PluralKit.Core /app/PluralKit.Core +COPY PluralKit.Web /app/PluralKit.Web +COPY PluralKit.sln /app RUN dotnet build -ENTRYPOINT ["dotnet", "run"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index be4ca6e3..cea99fef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,18 @@ version: "3" services: bot: build: . + entrypoint: ["dotnet", "run", "--project", "PluralKit.Bot"] environment: - - PK_TOKEN - - "PK_DATABASE_URI=Host=db;Username=postgres;Password=postgres;Database=postgres" + - "PluralKit:Bot:Token" + - "PluralKit:Database=Host=db;Username=postgres;Password=postgres;Database=postgres" links: - db + web: + build: . + entrypoint: ["dotnet", "run", "--project", "PluralKit.Web"] + environment: + - "PluralKit:Database=Host=db;Username=postgres;Password=postgres;Database=postgres" + links: + - db db: image: postgres:alpine \ No newline at end of file