Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Friday, July 24, 2015

Docker Redis

1) Create a script as such:
CONTAINER_NAME="redis_server"
REDIS_DATA_DIR="`pwd`/data-dir/redis/"
HOST_PORT_1="6379"

if [ ! -d "${REDIS_DATA_DIR}" ]
then
    mkdir -p "${REDIS_DATA_DIR}"
fi

docker rm ${CONTAINER_NAME}
docker run --name ${CONTAINER_NAME} --rm \
   -p ${HOST_PORT_1}:6379 \
   -v ${REDIS_DATA_DIR}:/data \
    redis

Friday, March 27, 2015

Simple Python Http Server

Serves up files in the current directory.

Python 3
python3 -m http.server
or
python3 -m http.server 8080

Python 2
python -m SimpleHTTPServer
or 
python -m SimpleHTTPServer 8080