Deploy "scratch" environments easily
git clone git@github.com:Krakaw/scratchpad.git
cp .controller.env.sample .controller.env
cp controller/.pg.env.sample controller/.pg.env
./start.sh
start.sh
will start the controller docker container that has a node.js web server that controls the rest of the docker containers.- The
controller
docker has access todocker.sock
so it can spin up the main environment (pg, redis, mockchain) as well as turn on and off the scratches. - Each scratch gets its own copy of the
templates/.*.env
and symlinked the other control files. - Each scratch has a unix socket that the nginx container proxies all traffic through.
- Either expose the nginx container port and update the server_name fields in nginx.conf or proxy an SSL connection from another nginx instance.
- Adding a new docker image that binds a volume and creates 3 socket files
- The socat image in the docker-compose.yml can use the socat-to-scp.sh script to forward traffic to the container
- The host nginx can use the uri either
*
.example.com or example.com/*
depending on the ssl setup to know which socket to proxy to