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: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"]
|
||||
ENTRYPOINT ["dotnet", "BirdsiteLive.dll"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true,
|
||||
"useSSL": true
|
||||
"useSSL": false
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue