* Initial kustomization

* Github actions

* Updated dockerfiles
This commit is contained in:
Lynn Orrell 2021-05-12 14:12:33 -05:00 коммит произвёл GitHub
Родитель e78eb98148
Коммит cfa7eafb80
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 178 добавлений и 43 удалений

Просмотреть файл

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

3
.github/workflows/package-services.yaml поставляемый
Просмотреть файл

@ -56,7 +56,8 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v2
with:
context: RedDog.${{ steps.service-split.outputs._0 }}/
# context: RedDog.${{ steps.service-split.outputs._0 }}/
context: /
file: RedDog.${{ steps.service-split.outputs._0 }}/Dockerfile
push: true
tags: |

38
.vscode/launch.json поставляемый
Просмотреть файл

@ -130,7 +130,7 @@
"DAPR_HTTP_PORT": "6780",
"DAPR_GRPC_PORT": "6701"
}
},
},
{
"name": "Debug Bootstrapper",
"type": "coreclr",
@ -144,8 +144,42 @@
"DAPR_HTTP_PORT": "5880",
"DAPR_GRPC_PORT": "5801"
}
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/RedDog.MakeLineService/bin/Debug/net5.0/RedDog.MakeLineService.dll",
"args": [],
"cwd": "${workspaceFolder}/RedDog.MakeLineService",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "Docker .NET Core Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"netCore": {
"appProject": "${workspaceFolder}/RedDog.Bootstrapper/RedDog.Bootstrapper.csproj"
}
}
],
"compounds": [
{

95
.vscode/tasks.json поставляемый
Просмотреть файл

@ -228,7 +228,7 @@
"6780"
],
"problemMatcher": []
},
},
{
"label": "Dapr VirtualWorker",
"command": "dapr",
@ -309,5 +309,98 @@
],
"problemMatcher": []
},
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/RedDog.MakeLineService/RedDog.MakeLineService.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/RedDog.MakeLineService/RedDog.MakeLineService.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/RedDog.MakeLineService/RedDog.MakeLineService.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"type": "docker-build",
"label": "docker-build: debug",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "reddog:dev",
"target": "base",
"dockerfile": "${workspaceFolder}/RedDog.Bootstrapper/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/RedDog.Bootstrapper/RedDog.Bootstrapper.csproj"
}
},
{
"type": "docker-build",
"label": "docker-build: release",
"dependsOn": [
"build"
],
"dockerBuild": {
"tag": "reddog:latest",
"dockerfile": "${workspaceFolder}/RedDog.Bootstrapper/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
},
"netCore": {
"appProject": "${workspaceFolder}/RedDog.Bootstrapper/RedDog.Bootstrapper.csproj"
}
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build: debug"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/RedDog.Bootstrapper/RedDog.Bootstrapper.csproj",
"enableDebugging": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build: release"
],
"dockerRun": {},
"netCore": {
"appProject": "${workspaceFolder}/RedDog.Bootstrapper/RedDog.Bootstrapper.csproj"
}
}
]
}

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.AccountingService/RedDog.AccountingService.csproj", "RedDog.AccountingService/"]
RUN dotnet restore "RedDog.AccountingService/RedDog.AccountingService.csproj"
COPY . .
WORKDIR "/src/RedDog.AccountingService"
RUN dotnet build "RedDog.AccountingService.csproj" -c Release -o /app/build

Просмотреть файл

@ -0,0 +1,21 @@
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
WORKDIR /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY . .
WORKDIR "/src/RedDog.Bootstrapper"
RUN dotnet build "RedDog.Bootstrapper.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "RedDog.Bootstrapper.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "RedDog.Bootstrapper.dll"]

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.LoyaltyService/RedDog.LoyaltyService.csproj", "RedDog.LoyaltyService/"]
RUN dotnet restore "RedDog.LoyaltyService/RedDog.LoyaltyService.csproj"
COPY . .
WORKDIR "/src/RedDog.LoyaltyService"
RUN dotnet build "RedDog.LoyaltyService.csproj" -c Release -o /app/build

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.MakeLineService/RedDog.MakeLineService.csproj", "RedDog.MakeLineService/"]
RUN dotnet restore "RedDog.MakeLineService/RedDog.MakeLineService.csproj"
COPY . .
WORKDIR "/src/RedDog.MakeLineService"
RUN dotnet build "RedDog.MakeLineService.csproj" -c Release -o /app/build

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.OrderService/RedDog.OrderService.csproj", "RedDog.OrderService/"]
RUN dotnet restore "RedDog.OrderService/RedDog.OrderService.csproj"
COPY . .
WORKDIR "/src/RedDog.OrderService"
RUN dotnet build "RedDog.OrderService.csproj" -c Release -o /app/build

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.ReceiptGenerationService/RedDog.ReceiptGenerationService.csproj", "RedDog.ReceiptGenerationService/"]
RUN dotnet restore "RedDog.ReceiptGenerationService/RedDog.ReceiptGenerationService.csproj"
COPY . .
WORKDIR "/src/RedDog.ReceiptGenerationService"
RUN dotnet build "RedDog.ReceiptGenerationService.csproj" -c Release -o /app/build

Просмотреть файл

@ -8,8 +8,6 @@ USER appuser
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.VirtualCustomers/RedDog.VirtualCustomers.csproj", "RedDog.VirtualCustomers/"]
RUN dotnet restore "RedDog.VirtualCustomers/RedDog.VirtualCustomers.csproj"
COPY . .
WORKDIR "/src/RedDog.VirtualCustomers"
RUN dotnet build "RedDog.VirtualCustomers.csproj" -c Release -o /app/build

Просмотреть файл

@ -6,8 +6,6 @@ ENV ASPNETCORE_URLS=http://+:80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["RedDog.VirtualWorker/RedDog.VirtualWorker.csproj", "RedDog.VirtualWorker/"]
RUN dotnet restore "RedDog.VirtualWorker/RedDog.VirtualWorker.csproj"
COPY . .
WORKDIR "/src/RedDog.VirtualWorker"
RUN dotnet build "RedDog.VirtualWorker.csproj" -c Release -o /app/build