Skip to content

Instantly share code, notes, and snippets.

View hendrikhofstadt's full-sized avatar

Hendrik Hofstadt hendrikhofstadt

View GitHub Profile
@hendrikhofstadt
hendrikhofstadt / Dockerfile
Last active May 26, 2018 05:23
Lisk alpine Dockerfile
FROM node:6-alpine AS builder
RUN apk add --no-cache python curl automake autoconf libtool git alpine-sdk
COPY . /home/lisk/lisk/
WORKDIR /home/lisk/lisk
RUN npm install --quiet --production --unsafe-perm
import * as socketCluster from 'socketcluster-client'
import * as request from 'request-promise'
import {RequestPromise} from 'request-promise'
import WAMPClient = require('wamp-socket-cluster/WAMPClient');
export class LiskClient {
socket: any;
public options = {
hostname: 'betanet.lisk.io',
port: 5001,
rservice:
image: slamper/disk_resizer:latest
environment:
- RESIZE_DEV
privileged: true
labels:
io.rancher.os.detach: false
io.rancher.os.scope: system
io.rancher.os.before: console
volumes:
@hendrikhofstadt
hendrikhofstadt / Dockerfile
Created December 31, 2015 12:07
Poxa Dockerfile
FROM edgurgel/poxa:latest
COPY ./scripts /app/bin
CMD ["/bin/sh","-c","/app/bin/startup.sh"]
@hendrikhofstadt
hendrikhofstadt / startup
Created December 31, 2015 12:02
Poxa startup script for Docker
/app/bin/setup_env.sh
trap exit TERM; /app/bin/poxa foreground & wait
@hendrikhofstadt
hendrikhofstadt / poxa_config.sh
Last active December 31, 2015 11:56
A simple script to create a poxa config from env variables
[ -z "$POXA_APP_COUNT" ] && echo "Not using env variables. Starting normally" && exit 1;
if ! [ $POXA_APP_COUNT -eq $POXA_APP_COUNT ] 2>/dev/null ; then
echo "POXA_APP_COUNT is not a number" >&2; exit 1;
fi
[ -z "$PORT" ] && echo "PORT not set" && exit 1;
if ! [ $PORT -eq $PORT ] 2>/dev/null ; then
echo "PORT is not a number" >&2; exit 1;
fi
#check if all variables are set
if [ "$POXA_APP_COUNT" -gt 1 ] ; then