Skip to content

Instantly share code, notes, and snippets.

View prayagsingh's full-sized avatar
:octocat:
Working from home

Prayag Singh prayagsingh

:octocat:
Working from home
View GitHub Profile
@prayagsingh
prayagsingh / git_cheat-sheet.md
Created July 8, 2019 05:38 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# The network connection profile provides client applications the information about the target
# blockchain network that are necessary for the applications to interact with it. These are all
# knowledge that must be acquired from out-of-band sources. This file provides such a source.
#
@prayagsingh
prayagsingh / docker-traefik.yaml
Last active February 20, 2020 13:42
Traefik with go application server
# Providers :- discover the services that live on your infrastructure (their IP, health, ...)
# Entrypoints :- listen for incoming traffic (ports, ...)
# Routers :- analyse the requests (host, path, headers, SSL, ...). A router is in charge of connecting incoming requests to the services that can handle them.
# Services :- forward the request to your services (load balancing, ...). The Services are responsible for configuring how to reach the actual services that will eventually handle the incoming requests.
# Middlewares :- may update the request or make decisions based on the request (authentication, rate limiting, headers, ...)
version: "3.7"
networks:
@prayagsingh
prayagsingh / traefik-manual-ssl.yml
Created February 25, 2020 08:02 — forked from ohnotnow/traefik-manual-ssl.yml
Traefik v2 with manual SSL certs
version: "3.7"
services:
traefik:
image: traefik:v2.1.3
restart: always
container_name: traefik
ports:
- target: 80
published: 80
@prayagsingh
prayagsingh / docker-compose-traefik.yaml
Created February 25, 2020 08:25
Treaefik with file provider and with letsencrypt and custom tls certs
# Providers :- discover the services that live on your infrastructure (their IP, health, ...)
# Entrypoints :- listen for incoming traffic (ports, ...)
# Routers :- analyse the requests (host, path, headers, SSL, ...). A router is in charge of connecting incoming requests to the services that can handle them.
# Services :- forward the request to your services (load balancing, ...). The Services are responsible for configuring how to reach the actual services that will eventually handle the incoming requests.
# Middlewares :- may update the request or make decisions based on the request (authentication, rate limiting, headers, ...)
version: "3.7"
networks:
@prayagsingh
prayagsingh / docker-explorer.yaml
Last active March 2, 2020 10:33
traefik with dashboard, bchain api and explorer with letsencrypt
version: '3.7'
volumes:
pgdata:
walletstore:
networks:
testchain-network:
external: true
name: testchain-network
@prayagsingh
prayagsingh / middlewares.toml
Created April 27, 2020 11:05 — forked from jakubhajek/middlewares.toml
The configuration of Traefik v2 that can be defined dynamically
[http]
[http.middlewares]
[http.middlewares.https-redirect.redirectscheme]
scheme = "https"
permanent = true
[http.middlewares.security-headers.headers]
# CORS
AccessControlAllowMethods = ["GET", "OPTIONS", "PUT"]
AccessControlAllowOrigin = "origin-list-or-null"
# docker stack deploy -c stack-tr-main.yml traefik --prune
version: "3.7"
services:
main:
image: traefik:v2.1.2
healthcheck:
test: wget --quiet --tries=1 --spider https://traefik.labs.cometari.eu/ping || exit 1
interval: 3s
timeout: 1s
# docker stack deploy -c stack-app.yml app --with-registry-auth --prune
version: "3.7"
services:
backend:
image: jakubhajek/nodejs-backend:latest
healthcheck:
test: wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1
interval: 3s
timeout: 1s
@prayagsingh
prayagsingh / stack-canary.yml
Created April 27, 2020 11:07 — forked from jakubhajek/stack-canary.yml
The example of canary deployment using Traefik 2.x
# docker stack deploy -c stack-canary.yml canary --with-registry-auth --prune
version: "3.7"
services:
app1:
image: jakubhajek/app1-node:v1
healthcheck:
test: wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1
interval: 3s
timeout: 1s