-
Notifications
You must be signed in to change notification settings - Fork 9
Dockerized template updates #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6c1e204
47adf5a
36048fa
0337135
aec2379
08846ec
73380db
8caae5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ Done. To undo this action, use 'ef migrations remove' | |
| PS C:\rojects\MyProject> | ||
| ``` | ||
|
|
||
| By default, the project applies database migrations on startup. If you want disable this behaviour, you can set appsettings.Local.json | ||
| By default, the project will NOT applies database migrations on startup. If you want enable this behaviour, you can set appsettings.Local.json | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will NOT apply* |
||
|
|
||
| ``` | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,7 +87,7 @@ Done. To undo this action, use 'ef migrations remove' | |
| PS C:\rojects\MyProject> | ||
| ``` | ||
|
|
||
| By default, the project applies database migrations on startup. If you want disable this behaviour, you can set appsettings.Local.json | ||
| By default, the project will NOT applies database migrations on startup. If you want enable this behaviour, you can set appsettings.Local.json | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will NOT apply* |
||
|
|
||
| ``` | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
|
|
||
| # Get base SDK Image from Microsoft | ||
| FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env | ||
| ARG Configuration=Release | ||
| ARG Configuration=Debug | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be two docker files? One for Debug and one for Release? |
||
| ENV DOTNET_CLI_TELEMETRY_OUTPUT=true \ | ||
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true | ||
| WORKDIR /app | ||
|
|
@@ -25,17 +25,7 @@ COPY src/NetWebApiTemplate.Application/. ./src/NetWebApiTemplate.Application/ | |
| COPY src/NetWebApiTemplate.Infrastructure/. ./src/NetWebApiTemplate.Infrastructure/ | ||
| COPY src/NetWebApiTemplate.Persistence/. ./src/NetWebApiTemplate.Persistence/ | ||
|
|
||
| # Build and publish app | ||
| WORKDIR /app/src/NetWebApiTemplate.Api | ||
| RUN dotnet publish -c $Configuration -o out | ||
|
|
||
| # Generate runtime image | ||
| FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine | ||
| # install cultures | ||
| RUN apk add --no-cache icu-libs | ||
| # Disbale the invariant mode "set in base image" | ||
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false | ||
| WORKDIR /app | ||
| EXPOSE 80 443 | ||
| COPY --from=build-env /app/src/NetWebApiTemplate.Api/out ./ | ||
| ENTRYPOINT ["dotnet", "NetWebApiTemplate.Api.dll"] | ||
|
|
||
| ENTRYPOINT ["dotnet", "watch", "run", "--project" , "NetWebApiTemplate.Api.csproj", "--urls", "https://*:44372;http://*:5000"] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will NOT apply*