From f9eae2bdcb585fb497ccbb9541fb6f377281574b Mon Sep 17 00:00:00 2001 From: Vincent Cloutier Date: Sun, 27 Nov 2022 17:33:11 -0500 Subject: [PATCH] docker stuff --- Dockerfile | 8 +++----- docker-compose.yml | 18 +++++++++++++++++- .../Properties/launchSettings.json | 3 ++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11a4422..9898212 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. - -FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:3.1-buster AS publish +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS publish COPY ./src/ ./src/ RUN dotnet publish "/src/BirdsiteLive/BirdsiteLive.csproj" -c Release -o /app/publish RUN dotnet publish "/src/BSLManager/BSLManager.csproj" -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -c Release -o /app/publish @@ -13,4 +11,4 @@ RUN dotnet publish "/src/BSLManager/BSLManager.csproj" -r linux-x64 --self-conta FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "BirdsiteLive.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "BirdsiteLive.dll"] diff --git a/docker-compose.yml b/docker-compose.yml index 27ba800..a5a386a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,24 @@ version: "3" services: + server: + image: bird:latest + restart: always + container_name: birdmakeup + environment: + - Instance:Domain=bird.makeup + - Instance:AdminEmail=name@domain.ext + - Db:Type=postgres + - Db:Host=db + - Db:Name=birdsitelive + - Db:User=birdsitelive + - Db:Password=birdsitelive + ports: + - "5000:80" + depends_on: + - db db: - image: postgres:9.6 + image: postgres:9 restart: always environment: - POSTGRES_USER=birdsitelive diff --git a/src/BirdsiteLive/Properties/launchSettings.json b/src/BirdsiteLive/Properties/launchSettings.json index 4dcf5f1..80d2896 100644 --- a/src/BirdsiteLive/Properties/launchSettings.json +++ b/src/BirdsiteLive/Properties/launchSettings.json @@ -26,9 +26,10 @@ "Docker": { "commandName": "Docker", "launchBrowser": true, + "applicationUrl": "http://localhost:5000", "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "publishAllPorts": true, - "useSSL": true + "useSSL": false } } } \ No newline at end of file