An attempt to separate out the reverse proxy from the website repo.
This ended up never being used, having been supplanted by the srobo-nginx
role within https://github.com/srobo/ansible/.
-
Fetch the latest base image:
$ docker pull nginx
-
Build the image:
$ docker build --tag srobo/reverse-proxy .
-
Start the container:
$ docker run --rm -p 80:80 --name srobo srobo/reverse-proxy
Note: You can change the bound ports so they don't conflict with your local host's configuration. For example, you might want to replace
-p 80:80
with-p 8080:80
. -
Visit http://localhost in a browser (adjust the port as needed if you edited it), and confirm that you see a copy of the SR website (also check that you didn't get redirect to the real one!)
-
Make your changes to the
nginx.conf
-
Get those changes into the container and reload nginx:
$ docker cp nginx.conf srobo:/etc/nginx/nginx.conf && docker kill -s HUP srobo
-
Refresh your browser and bask in the glory of your changes
When you've made a change, either push it to a forked repository, or to a feature branch, and raise a pull request.
Note: full deployment instructions are separate.
The master
branch of repo is built into a Docker image by Circle CI
which is then deployed manually into a Kubernetes hosted on DigitalOcean.