master
exsersewo 4 years ago
parent 37e5c0796e
commit 46ecfda134
  1. 4
      .dockerignore
  2. 8
      .env.default
  3. 10
      NuGet.config
  4. 12
      docker-compose.yml
  5. 25
      src/.dockerignore
  6. 16
      src/RestAPI/Dockerfile

@ -0,0 +1,4 @@
.git
.github
**/.idea
**/.vs

@ -0,0 +1,8 @@
DATASOURCE=
HOST=
HOSTPORT=
USERNAME=
PASSWORD=
DATABASE=
BLACKLISTEDFIELDS=
HTTPSPORT=

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>

@ -0,0 +1,12 @@
version: '3'
services:
api:
build:
context: .
dockerfile: src/RestAPI/Dockerfile
ports:
- "80:80"
container_name: "restapi"
env_file:
- .env
network_mode: host

@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

@ -0,0 +1,16 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build
WORKDIR /app
COPY ["src/RestAPI/RestAPI.csproj", "src/RestAPI/"]
RUN dotnet restore "src/RestAPI/RestAPI.csproj"
COPY . .
WORKDIR ./src/RestAPI
RUN dotnet build "RestAPI.csproj" -c Release -o /app/build
RUN dotnet publish "RestAPI.csproj" -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:5.0
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "RestAPI.dll"]
Loading…
Cancel
Save