docker stuff
This commit is contained in:
parent
3dca5fd72c
commit
f9eae2bdcb
3 changed files with 22 additions and 7 deletions
|
@ -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:6.0 AS base
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim AS base
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
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/
|
COPY ./src/ ./src/
|
||||||
RUN dotnet publish "/src/BirdsiteLive/BirdsiteLive.csproj" -c Release -o /app/publish
|
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
|
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
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "BirdsiteLive.dll"]
|
ENTRYPOINT ["dotnet", "BirdsiteLive.dll"]
|
||||||
|
|
|
@ -2,8 +2,24 @@ version: "3"
|
||||||
|
|
||||||
services:
|
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:
|
db:
|
||||||
image: postgres:9.6
|
image: postgres:9
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=birdsitelive
|
- POSTGRES_USER=birdsitelive
|
||||||
|
|
|
@ -26,9 +26,10 @@
|
||||||
"Docker": {
|
"Docker": {
|
||||||
"commandName": "Docker",
|
"commandName": "Docker",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
|
"applicationUrl": "http://localhost:5000",
|
||||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||||
"publishAllPorts": true,
|
"publishAllPorts": true,
|
||||||
"useSSL": true
|
"useSSL": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue