Skip to content

Instantly share code, notes, and snippets.

View Willburn's full-sized avatar

adanorthpool Willburn

View GitHub Profile
version: '3.7'
services:
# COMMENT FOR YOUR DOCKER SWARM
# for this to work:
# constraints you need to register a label for each computer in the swarm.
# you need to have initialized a swarm https://docs.docker.com/engine/reference/commandline/swarm_init/ and made workers join it
# then you need to label the manager and the workers with docker node update --label-add comp=yourcomputertodeploy id_of_your_node
# you need to set CNODEIP with your public ip.
# you need to set published port to ports you have open on the local computer your deploying too and router/internet of that computer
FROM ubuntu:19.10 AS builder
ENV NODE_VERSION="1.11.0"
ENV CABAL_VERSION="cabal-install-3.0"
ENV GHC_VERSION="ghc-8.6.5"
ENV PATH=/usr/sbin:/usr/bin:/usr/local/bin:/sbin:/bin:/opt/cabal/bin:/opt/ghc/bin/
RUN apt update -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:hvr/ghc -y && \
apt update -y && \
# global filter; messages must have at least this severity to pass:
# Typical values would be Warning, Notice, Info or Debug
minSeverity: Info
# global file rotation settings:
rotation:
rpLogLimitBytes: 10000000
rpKeepFilesNum: 10
rpMaxAgeHours: 24
# global filter; messages must have at least this severity to pass:
minSeverity: info
# global file rotation settings:
rotation:
rpLogLimitBytes: 5000000
rpKeepFilesNum: 10
rpMaxAgeHours: 24
# these backends are initialized:
FROM ubuntu:19.10 AS builder
ENV NODE_VERSION="1.11.0"
ENV CABAL_VERSION="cabal-install-3.0"
ENV GHC_VERSION="ghc-8.6.5"
ENV PATH=/usr/sbin:/usr/bin:/usr/local/bin:/sbin:/bin:/opt/cabal/bin:/opt/ghc/bin/
RUN apt update -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:hvr/ghc -y && \
apt update -y && \
@Willburn
Willburn / gist:031e8c5b9a97ed214b5845da2101fff6
Created April 29, 2020 00:30
docker-entrypoint.sh example
#!/usr/bin/env bash
set -e
if [ -z "$CNODEIPV4" ]; then
cat >&2 <<EOF
A CNODEIPV4 is required to run this container, for example docker run -e CNODEIPV4=XX.XX.XX.XX
EOF
exit 1
fi
socat -d tcp-listen:12100,reuseaddr,fork tcp:127.0.0.1:12000 &
@Willburn
Willburn / gist:8f453f1c944422c556094c58f085d849
Created May 15, 2020 19:25
Adding tutorial content into a bit more custom filename scripting
# Create names of verification and singing key for an address
echo enter name of verification key file should end with .vkey
read verificationkey
echo enter name of the signing key file should end with skey
read signingkey
# generate the address in folder currentdirectory/addr/
cardano-cli shelley address key-gen \
--verification-key-file addr/$verificationkey \
--signing-key-file addr/$signingkey
@Willburn
Willburn / gist:5240f6f2fc45e49a1bc01af183ae5dfd
Created May 16, 2020 01:12
multiple (2) transaction script
cat << "EOF"
``.'",,:>*r!~'`
`',,,,,,,:::::^/^!!~`
`.'"",,'',:~!^::!:=;;>ii!'
`.',''.`````:....';,,~::=vvl^`
.',,'....'',::,,::::::::>;ri|\\:`
`.,,,''` ',.```````,.'',,~^^:!^>iJ?`
`'''.````',. `.':,,,"~:!ii7l7v7Jr`
',,,':::~,.....!::,,,,',,!":::::|7!:;>`
',,,'.:'.`` :,.```.',:v;!:!^r?xv|il;
@Willburn
Willburn / gist:32fb6c5bf69e85258320bc7be7a24db5
Last active May 18, 2020 21:27
Create address vkey skey
cat << "EOF"
``.'",,:>*r!~'`
`',,,,,,,:::::^/^!!~`
`.'"",,'',:~!^::!:=;;>ii!'
`.',''.`````:....';,,~::=vvl^`
.',,'....'',::,,::::::::>;ri|\\:`
`.,,,''` ',.```````,.'',,~^^:!^>iJ?`
`'''.````',. `.':,,,"~:!ii7l7v7Jr`
',,,':::~,.....!::,,,,',,!":::::|7!:;>`
',,,'.:'.`` :,.```.',:v;!:!^r?xv|il;
cat << "EOF"
``.'",,:>*r!~'`
`',,,,,,,:::::^/^!!~`
`.'"",,'',:~!^::!:=;;>ii!'
`.',''.`````:....';,,~::=vvl^`
.',,'....'',::,,::::::::>;ri|\\:`
`.,,,''` ',.```````,.'',,~^^:!^>iJ?`
`'''.````',. `.':,,,"~:!ii7l7v7Jr`
',,,':::~,.....!::,,,,',,!":::::|7!:;>`
',,,'.:'.`` :,.```.',:v;!:!^r?xv|il;