nginx setup assumes the user has access to a Debian-based GNU/Linux environment. This, in many cases (especially with OSX), is not pragmatically possible.
General Problems
- System package managers pull different versions of the default nginx configurations
- The default nginx user isn't always named
nginx (can be named http, or www depending on version)
- Sometimes, no nginx user is created at all
OSX Problems
- nginx configs are in
$HOMEBREW_PREFIX. All paths in .nginxconf and .conf files are absolute.
- Further possible variations in nginx configuration brought on by different package managers (e.g., MacPorts)
- Setting up ACLs (Access-Control-Lists) is non-trivial in OSX and requires a hacky workaround with
chmod.
- No
nginx user is created by default
Proposed Solution
- Write a Dockerfile (e.g.,
dev.Dockerfile) that builds an nginx Docker image with all the durhack-nginx configurations copied into the image
-
- Docker container exposes port 80
- Host OS forwards application ports into the Docker container
- Upon changing/setting up
durhack-nginx, rebuild the Docker image
nginxsetup assumes the user has access to a Debian-based GNU/Linux environment. This, in many cases (especially with OSX), is not pragmatically possible.General Problems
nginx(can be namedhttp, orwwwdepending on version)OSX Problems
$HOMEBREW_PREFIX. All paths in.nginxconfand.conffiles are absolute.chmod.nginxuser is created by defaultProposed Solution
dev.Dockerfile) that builds annginxDocker image with all thedurhack-nginxconfigurations copied into the imagedurhack-nginx, rebuild the Docker image