DEPRECATED: As of 29th March 2018 this project has been deprecated and archived. Please go see the main project autodock for suitable alternatives. Why? Basically I've stopped using hipache as my load balanacer / reverse proxy of choise as it is memory inefficient. Traefik is a much better and more popluar choice and since it automatically manages its own configuration so autodock doesn't have to.
autodock-paas is MIT licensed.
This stack is also registered over at Stackfiles.
$ curl -sSL https://raw.githubusercontent.com/prologic/autodock-paas/master/setup.sh | bash -s
Now whenever you start a new container autodock will listen for Docker events and discover containers that have been started. The
autodock-hipache plugin will specifically listen for starting containers that have a
VIRTUALHOST environment variable and reconfigure the running
Start a "Hello World" Web Application:
$ docker run -d -e VIRTUALHOST=hello.mydomain.com prologic/hello curl -q -o - -H 'Host: hello.mydomain.com' http://localhost/ Hello World!
This method of hosting and managing webapps and websites is in
production deployments and talked about in more detail in the post [A Docker-based mini-PaaS](<http://shortcircuit.net.au/~prologic/blog/article/2015/03/24/a-docker-based-mini-paas/).
$ docker run -d -e DOMAIN=mydomain.com -v /var/run/docker.sock:/var/run/docker.sock prologic/autodock-paas
Or as a Docker Compose service:
autodockpaas: image: prologic/autodock-paas environment: - DOMAIN=mydomain.com volumes: - /var/run/docker.sock:/var/run/docker.sock restart: always
Creating SSL Certificates
Use either the
mksslcert from the OpenSSL package. Example:
mkdir -p etc/hipache/ssl mksslcert ssl/hipache/ssl/ssl.key ssl/hipache/ssl/ssl.crt '*.mydomain.com'
The prologic/mksslcrt image uses this tool to automatically created self-signed SSL certificates when run. Examples:
Host mounted volume:
$ docker run --rm -v $(pwd):ssl:/ssl mksslcrt '*.mydomain.com'
Data volume container:
$ docker run --name sslcerts prologic/mksslcrt '*.mydomain.com' $ docker run --volumes-from sslcerts prologic/hipache
Or this nice Docker Image: cpuguy83/sslgen.
For signed certificates have a look at starefossen/sslmate.