Last active
December 20, 2016 23:13
-
-
Save osvalr/e7fae43421633ebe4ad93fca051bbb3a to your computer and use it in GitHub Desktop.
t2drc: template configuration for travisfile2dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copy and pase this file into your user home directory | |
# and also add in your .bashrc or .bash_profile: ". ~/.t2drc" (without quotes) | |
# main docker port | |
# IMPORTANT: replace the MAIN_PORT value | |
export DOCKER_PORT=MAIN_PORT | |
# secondary docker port | |
# It is used when you having troubles with the main one, uncomment when the main one fails | |
# IMPORTANT: replace the BACKUP_PORT | |
#export DOCKER_PORT=BACKUP_PORT | |
# raditz folder | |
export RADITZ_FOLDER="/home/$USER/.vx_raditz" | |
# Used to remove RADITZ server env vars | |
function unset_raditz { | |
unset DOCKER_HOST | |
unset DOCKER_CERT_PATH | |
unset DOCKER_TLS_VERIFY | |
} | |
# Used to set RADITZ server env vars | |
function set_raditz { | |
export DOCKER_HOST=tcp://${RADITZ_SERVER}:$DOCKER_PORT | |
export DOCKER_CERT_PATH=$RADITZ_FOLDER | |
export DOCKER_TLS_VERIFY=1 | |
} | |
# TCP ports range, | |
# IMPORTANT: replace XXXX and YYYY with real values | |
export RADITZ_TCP_PORTS='XXXX-YYYY' | |
# web, ssh and tcp | |
RADITZ_PORTS='-p $RADITZ_TCP_PORTS:8069 -p $RADITZ_TCP_PORTS:22 -p $RADITZ_TCP_PORTS:5432' | |
# UPD ports | |
# IMPORTANT: replace XXXX1,YYYY1,XXXX2,YYYY2 that represents 2 port ranges | |
RADITZ_UDP_PORTS='-p XXXX1-YYYY1:XXXX2-YYYY2/udp' | |
# aliases | |
alias t2d="travisfile2dockerfile --root-path=${HOME}/.t2d --run-extra-args='-it --entrypoint=bash -e LANG=en_US.UTF-8 $RADITZ_PORTS $RADITZ_UDP_PORTS -e START_SSH=1 -m 8g --memory-swap=-1 --kernel-memory=10g --device-write-bps=/dev/sda:10mb --device-read-bps=/dev/sda:10mb --device-write-bps=/dev/md2:10mb --device-read-bps=/dev/md2:10mb --device-write-bps=/dev/sdb:10mb --device-read-bps=/dev/sdb:10mb' --add-remote=vauxoo,vauxoo-dev" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment