Skip to content

Instantly share code, notes, and snippets.

View stephenhillier's full-sized avatar
🛸
I may be slow to respond.

Steve Hillier stephenhillier

🛸
I may be slow to respond.
View GitHub Profile
apiVersion: batch/v1
kind: Job
metadata:
name: myapp-db-migrate
namespace: myapp
spec:
backoffLimit: 5
activeDeadlineSeconds: 900
template:
spec:
apiVersion: template.openshift.io/v1
kind: Template
metadata:
annotations:
description: |-
Patroni Postgresql database cluster, with persistent storage.
iconClass: icon-postgresql
openshift.io/display-name: Patroni Postgresql (Persistent)
openshift.io/long-description: This template deploys a patroni postgresql HA
cluster with persistent storage.
@stephenhillier
stephenhillier / Jenkinsfile
Created September 30, 2019 15:47
Jenkinsfile with github deployment
#!groovy
@Library('bcgov-library') _
import bcgov.GitHubHelper
// Notify stage status and pass to Jenkins-GitHub library
void notifyStageStatus (String name, String status) {
GitHubHelper.createCommitStatus(
this,
sh(returnStdout: true, script: 'git rev-parse HEAD'), // this is the most recent commit ID
status,
@stephenhillier
stephenhillier / vue.Dockerfile
Created January 9, 2020 17:29
Dockerfile for building and deploying Vue
FROM node:10 as build
WORKDIR /app
COPY package*.json /app/
RUN npm ci
COPY . .
@stephenhillier
stephenhillier / docgen.py
Last active November 4, 2020 22:56
Common Document Generator Python example
""" Functions for interacting with the Common Document Generator (CDOGS) API """
import base64
import requests
import logging
from fastapi import HTTPException
from api import config
@stephenhillier
stephenhillier / Caddyfile
Created April 15, 2020 17:12
Caddy 2 config
:8080
root * /app/src
encode gzip
route {
reverse_proxy /api/* {$WALLY_BACKEND_SERVICE}:8000
reverse_proxy /docs {$WALLY_BACKEND_SERVICE}:8000
file_server
@stephenhillier
stephenhillier / Dockerfile
Created May 7, 2020 18:48
PostGIS Patroni Dockerfile
FROM registry.hub.docker.com/library/postgres:10
# Patroni install from https://github.com/zalando/patroni
# OpenShift config from https://github.com/BCDevOps/platform-services
# PostGIS install adapted from https://github.com/appropriate/docker-postgis
ARG PGHOME=/home/postgres
ENV POSTGIS_MAJOR 2.5
ENV POSTGIS_VERSION 2.5.4+dfsg-1.pgdg90+1
{
"suggest.noselect": false,
"diagnostic.errorSign": "✘",
"diagnostic.warningSign": "!",
"diagnostic.infoSign": "?",
"diagnostic.checkCurrentLine": true,
"coc.preferences.hoverTarget": "float",
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"html",