-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"ConnectionStrings": { | ||
"Default": "Host=postgre;Port=5432;Database=CRM;User ID=root;Password=2024@09$14&Start;" | ||
}, | ||
"Redis": { | ||
"Configuration": "redis" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
COPY bin/Release/net8.0/publish/ app/ | ||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
||
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base | ||
USER app | ||
WORKDIR /app | ||
ENV ASPNETCORE_URLS=http://+:80 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
WORKDIR /src | ||
COPY ["samples/CRM.DbMigrator/CRM.DbMigrator.csproj", "samples/CRM.DbMigrator/"] | ||
COPY ["samples/CRM.EntityFrameworkCore/CRM.EntityFrameworkCore.csproj", "samples/CRM.EntityFrameworkCore/"] | ||
COPY ["samples/CRM.Domain/CRM.Domain.csproj", "samples/CRM.Domain/"] | ||
COPY ["samples/CRM.Domain.Shared/CRM.Domain.Shared.csproj", "samples/CRM.Domain.Shared/"] | ||
COPY ["samples/CRM.Application.Contracts/CRM.Application.Contracts.csproj", "samples/CRM.Application.Contracts/"] | ||
RUN dotnet restore "./samples/CRM.DbMigrator/CRM.DbMigrator.csproj" | ||
COPY . . | ||
WORKDIR "/src/samples/CRM.DbMigrator" | ||
RUN dotnet build "./CRM.DbMigrator.csproj" -c $BUILD_CONFIGURATION -o /app/build | ||
|
||
FROM build AS publish | ||
ARG BUILD_CONFIGURATION=Release | ||
RUN dotnet publish "./CRM.DbMigrator.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "CRM.DbMigrator.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"profiles": { | ||
"CRM.DbMigrator": { | ||
"commandName": "Project" | ||
}, | ||
"Container (Dockerfile)": { | ||
"commandName": "Docker" | ||
} | ||
} | ||
} |