(Some notes on setting up docker/nginx to serve what Cryogen generated)
$ git clone https://github.com/agam/personal-site.git
$ sudo aptitude install docker
$ docker pull nginx
$ lein ring server-headless
$ docker run --name docker-nginx-myweb -p 80:80 -d -v ~/Github/personal-site/resources/public:/usr/share/nginx/html nginx
$ mkdir docker-nginx; cd docker-nginx
$ docker cp docker-nginx-myweb:/etc/nginx/conf.d/default.conf default.conf
Make the following change/replacement:
location = / {
root /usr/share/nginx/html;
rewrite "^.$" /blog break;
}
location /blog {
root /usr/share/nginx/html;
index index.html index.htm;
}
(stop
and remove
the old container first)
docker run --name docker-nginx-myweb -p 80:80 -d -v ~/Github/personal-site/resources/public:/usr/share/nginx/html -v ~/docker-nginx/default.conf:/etc/nginx/conf.d/default.conf nginx
Note: for all tweaks to the config, since nginx doesn't "hot-load" it, the container has to be restarted:
$ docker restart docker-nginx-myweb