This file contains hidden or 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
| public class PostRepository | |
| { | |
| public PostRepository(IWebHostEnvironment env, IMemoryCache cache) | |
| { | |
| Env = env; | |
| _Cache = cache; | |
| } | |
| public IHostEnvironment Env { get; } |
This file contains hidden or 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
| <h2>Recent Lessons</h2> | |
| <PagingPostCollection | |
| Posts="Posts" PageSize="6" | |
| @rendermode="InteractiveWebAssembly" | |
| SortAscending="false" /> |
This file contains hidden or 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
| builder.Services.AddWebOptimizer(pipeline => { | |
| pipeline.AddCssBundle("/css/bundle.css", new NUglify.Css.CssSettings | |
| { | |
| CommentMode = NUglify.Css.CssComment.None, | |
| }, "app.css", "css/bootstrap.css", "style.css", | |
| "css/plugins.css", "css/colors.css", "css/responsive.css"); | |
| pipeline.MinifyJsFiles("/js/jqueryCustom.js"); | |
| }); |
This file contains hidden or 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
| app.UseStaticFiles(new StaticFileOptions() | |
| { | |
| OnPrepareResponse = | |
| r => { | |
| string path = r.File.PhysicalPath; | |
| if (path.EndsWith(".css") || path.EndsWith(".js") || | |
| path.EndsWith(".gif") || path.EndsWith(".jpg") || | |
| path.EndsWith(".png") || path.EndsWith(".svg") || path.EndsWith(".webp")) | |
| { | |
| TimeSpan maxAge = new TimeSpan(370, 0, 0, 0); |
This file contains hidden or 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
| version: "3" | |
| services: | |
| watchtower: | |
| image: containrrr/watchtower:armhf-latest | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| - /jfritz/.docker/config.json:/config.json | |
| command: ["--interval", "30", "--cleanup"] | |
| restart: always |
This file contains hidden or 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
| FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview-alpine AS build | |
| ARG TARGETARCH | |
| WORKDIR /source | |
| # copy csproj and restore as distinct layers | |
| COPY Fritz.DemoPi/*.csproj . | |
| RUN dotnet restore -a $TARGETARCH | |
| # copy everything else and build app | |
| COPY Fritz.DemoPi/. . |
This file contains hidden or 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
| version: "3" | |
| services: | |
| demopi: | |
| image: fritzregistry.azurecr.io/fritz.demopi:latest | |
| volumes: | |
| - type: bind | |
| - source: /home/jfritz/demopo/ClickCount.csv | |
| - target: /app/ClickCount.csv | |
| ports: | |
| - "80:8080" |
This file contains hidden or 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
| name: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: |
OlderNewer