Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / AppExtensions.cs
Last active September 21, 2022 05:38
blazor-upgrade-clean
delete
@gistlyn
gistlyn / Configure.Db.Migrations.cs
Last active September 1, 2022 01:58
Add OrmLite DB Migrations to an existing project
using MyApp.Migrations;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
namespace MyApp;
// Code-First DB Migrations: https://docs.servicestack.net/ormlite/db-migrations
@gistlyn
gistlyn / Configure.Db.Migrations.cs
Last active August 30, 2022 00:51
sqlite-vnext
using MyApp.Migrations;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
[assembly: HostingStartup(typeof(MyApp.ConfigureDbMigrations))]
namespace MyApp;
public class ConfigureDbMigrations : IHostingStartup
@gistlyn
gistlyn / app.settings
Last active August 27, 2022 08:56
Admin UI
debug false
name Admin UI
redis.connection localhost:6379
icon redis.ico
jsMinifier ServiceStack
htmlMinifier ServiceStack
features RunAsAdminFeature, AdminRedisFeature
RunAsAdminFeature { RedirectTo: '/admin-ui/redis' }
CefConfig { width:1150, height:1050 }
@gistlyn
gistlyn / Configure.Profiling.cs
Last active February 7, 2024 06:26
profiling
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureProfiling))]
namespace MyApp;
public class ConfigureProfiling : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices((context, services) => {
@gistlyn
gistlyn / .deploy\docker-compose.yml
Last active December 13, 2023 05:43
blazor-litestream-sftp
version: "3.9"
services:
app:
image: ghcr.io/${IMAGE_REPO}:${RELEASE_VERSION}
restart: always
depends_on:
app-litestream:
condition: service_healthy
ports:
- "8080"
@gistlyn
gistlyn / .deploy\docker-compose.yml
Last active December 13, 2023 05:43
blazor-litestream-azure
version: "3.9"
services:
app:
image: ghcr.io/${IMAGE_REPO}:${RELEASE_VERSION}
restart: always
depends_on:
app-litestream:
condition: service_healthy
ports:
- "8080"
@gistlyn
gistlyn / .deploy\docker-compose.yml
Last active December 13, 2023 05:38
blazor-litestream-aws
version: "3.9"
services:
app:
image: ghcr.io/${IMAGE_REPO}:${RELEASE_VERSION}
restart: always
depends_on:
app-litestream:
condition: service_healthy
ports:
- "8080"
using Funq;
using ServiceStack;
using MyApp.ServiceInterface;
[assembly: HostingStartup(typeof(MyApp.AppHost))]
namespace MyApp;
public class AppHost : AppHostBase, IHostingStartup
{
@gistlyn
gistlyn / .deploy\docker-compose-template.yml
Last active August 31, 2022 04:57
jamstack-litestream-sftp
version: "3.9"
services:
${APP_NAME}:
image: ghcr.io/${IMAGE_REPO}:${RELEASE_VERSION}
depends_on:
${APP_NAME}-litestream:
condition: service_healthy
restart: always
network_mode: bridge
ports: