Skip to content

Instantly share code, notes, and snippets.

@gistlyn
gistlyn / MyApp.csproj
Last active May 16, 2021
ServiceStack.Redis TODOs
View MyApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack.Redis" Version="5.*" />
@gistlyn
gistlyn / MyApp.csproj
Last active May 16, 2021
ServiceStack.Text - .NET's missing high-performance utility belt
View MyApp.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack.Common" Version="5.*" />
@gistlyn
gistlyn / ChinookQueryArtists.csproj
Created Apr 15, 2021
Chinook Query Artists Example
View ChinookQueryArtists.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack.Client" Version="5.*" />
View Configure.Validation.cs
using Microsoft.Extensions.DependencyInjection;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.Validation;
namespace MyApp
{
public class ConfigureValidation : IConfigureServices, IConfigureAppHost
{
public void Configure(IServiceCollection services)
View Configure.Postman.cs
using System;
using System.Collections.Generic;
using System.Linq;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ServiceStack.Host;
using ServiceStack.Model;
using ServiceStack.Text;
using ServiceStack.Web;
View .github\workflows\README.md

ServiceStack mix GitHub Actions

release.yml generated from x mix release-hub-vanilla, this template in designed to help with CI deployment to a dedicated server with SSH access.

Overview

release.yml is designed to work with a ServiceStack app deploying directly to a single server via SSH. A docker image is built and stored on DockerHub docker registry when a GitHub Release is created.

GitHub Actions specified in release.yml then copy files remotely via scp and use docker-compose to run the app remotely via SSH.

Deployment server setup

To get this working, a server needs to be setup with the following:

View .github\workflows\README.md

ServiceStack mix GitHub Actions

release.yml generated from x mix release-ecr-vanilla, this template in designed to help with automating CI deployment to a dedicated server with SSH access while using AWS ECR as container image registry.

Overview

release.yml is designed to work with a ServiceStack app deploying directly to a single server via SSH. A docker image is built and stored on AWS ECR container registry when a GitHub Release is created. GitHub Actions specified in release.yml then copy files remotely via scp and use docker-compose to run the app remotely via SSH.

Deployment server setup

To get this working, a server needs to be setup with the following:

@gistlyn
gistlyn / bin\my_app.dart
Last active Mar 12, 2021
test Flutter Console App
View bin\my_app.dart
import 'dart:io';
import 'dart:typed_data';
import 'package:servicestack/client.dart';
import 'package:servicestack/inspect.dart';
import '../lib/dtos.dart';
void main(List<String> arguments) async {
var client = new JsonServiceClient('https://techstacks.io');
@gistlyn
gistlyn / Package.swift
Last active Mar 9, 2021
swift-allcollections
View Package.swift
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MyApp",
dependencies: [
.package(name: "ServiceStack", url: "https://github.com/ServiceStack/ServiceStack.Swift.git",
Version(5,0,0)..<Version(6,0,0))
],
targets: [
@gistlyn
gistlyn / Package.swift
Last active Mar 9, 2021
swift-alltypes
View Package.swift
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MyApp",
dependencies: [
.package(name: "ServiceStack", url: "https://github.com/ServiceStack/ServiceStack.Swift.git",
Version(5,0,0)..<Version(6,0,0))
],
targets: [