DEPRECATED. This library is no longer maintained. On metal docker solutions have been deprecated in favour of k8s.
Easy boilerplate to run an nginx instance that also boots up a system wide nginx-proxy (jwilder/nginx-proxy) and makes sure it doesn't run more than once.
- run
yarn add docker-nginx-easy
- Set up your package json like so (rename as you like):
{ "scripts": { "up": "docker-nginx-easy up", "down": "docker-nginx-easy down", "proxy-down": "docker-nginx-global-proxy down" } }
- Make sure you have a .nginx.env file in your project root and make sure you set the
HOSTNAME
variable to your domain name(s).HOSTNAME=myapp.test
- Put an index.html file in your
public
folder. - run
yarn up
- Don't use the .dev TLD for local development. It don't work so good.
- You can supply extra .conf files via the
nginx/templates
directory in your project root. Make sure to suffix them with.conf.template
file extension.