Some changes

This commit is contained in:
kunkliricsi 2020-11-23 13:31:09 +01:00
parent 5b42ce9f43
commit 966d8bd79e
5 changed files with 17 additions and 27 deletions

View File

@ -12,6 +12,7 @@
**/*.dbmdl **/*.dbmdl
**/*.jfm **/*.jfm
**/azds.yaml **/azds.yaml
**/docs
**/bin **/bin
**/docker-compose* **/docker-compose*
**/Dockerfile* **/Dockerfile*

View File

@ -1,15 +1,13 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 RUN apt-get update && apt-get install -y curl
EXPOSE 443
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get update RUN apt-get update && apt-get install -y nodejs
RUN apt-get install -y nodejs
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get update RUN apt-get update && apt-get install -y nodejs
RUN apt-get install -y nodejs
WORKDIR /src WORKDIR /src
COPY ["Birdmap.API/Birdmap.API.csproj", "Birdmap.API/"] COPY ["Birdmap.API/Birdmap.API.csproj", "Birdmap.API/"]
COPY ["Birdmap.BLL/Birdmap.BLL.csproj", "Birdmap.BLL/"] COPY ["Birdmap.BLL/Birdmap.BLL.csproj", "Birdmap.BLL/"]

View File

@ -9,9 +9,6 @@
<DockerServiceName>birdmap.api</DockerServiceName> <DockerServiceName>birdmap.api</DockerServiceName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" /> <None Include="docker-compose.yml" />
<None Include=".dockerignore" /> <None Include=".dockerignore" />
</ItemGroup> </ItemGroup>

View File

@ -1,13 +0,0 @@
version: '3.4'
services:
birdmap.api:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
ports:
- "80"
- "443"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro

View File

@ -10,15 +10,22 @@ services:
birdmap.api: birdmap.api:
image: ${DOCKER_REGISTRY-}birdmapapi image: ${DOCKER_REGISTRY-}birdmapapi
ports: ports:
- "5000:5000" - "8000:80"
- "5001:5001" - "8001:443"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
build: build:
context: . context: .
dockerfile: Birdmap.API/Dockerfile dockerfile: Birdmap.API/Dockerfile
depends_on: depends_on:
- db - db
environment: environment:
- ASPNETCORE_URLS=https://localhost:5001;http://localhost:5000 - ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+;http://+
- ASPNETCORE_HTTPS_PORT=8001
- ASPNETCORE_Kestrel__Certificates__Default__Password=certpass123
- ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/aspnetapp.pfx
- Birdmap_LocalDbConnectionString=Data Source=db;Initial Catalog=birdmap;User=sa;Password=RPSsql12345 - Birdmap_LocalDbConnectionString=Data Source=db;Initial Catalog=birdmap;User=sa;Password=RPSsql12345
- Birdmap_Defaults__Users__0__Name=admin - Birdmap_Defaults__Users__0__Name=admin
- Birdmap_Defaults__Users__0__Password=pass - Birdmap_Defaults__Users__0__Password=pass