Comments (7)
I've been getting by in plushu/plushu-container by mounting my Nginx conf volume in /usr/local/nginx/etc
and just explicitly specifying the location with -c
.
If this is proposing setting the default prefix to /etc/nginx
and the default config to /etc/nginx/nginx.conf
, I'm all for that (it'd be one less thing to specify and one less difference I'd have to worry about between running my configuration in a container vs. on the host).
I don't know anything about the default nginx.conf or sites-enabled, I don't use either of those. (https://github.com/plushu/plushu-nginx-container/blob/master/install should give a fair idea of what Plushu's Nginx setup looks like)
from nginx.
I like moving the conf files to their own folder in /etc
. We should incorporate this idea into the other base images so that configuration is easier to override, esp given moby/moby#6011.
from nginx.
I second this. In fact I tried to get it in a pull request way back but then it was of no interest for some reason.
Happy to see it coming anyways.
from nginx.
Here's what I use: felixhummel@a06716a
Interesting bits
--conf-path=/etc/nginx/nginx.conf
--prefix=/nginx
And the run looks like this:
docker run \
-v /some/data/dir:/nginx \
-v /config/dir/etc:/etc/nginx \
nginx:latest
Not perfect, but works for me. I guess we need some best practices / standards guide for those kind of things. /nginx
seems like a hack to me, but I wanted it separate from the config.
from nginx.
Assuming /nginx
contains your site pages etc, maybe use /var/www
or /var/www/html
?
from nginx.
conf-path
andprefix
should be separate, becauseinclude foo.conf
then refers to$(dirname $conf-path)/foo.conf
for configs androot bar
refers to$prefix/bar
for static data
conf-path
should be/etc/nginx/nginx.conf
to allow mounting of /etc/nginx or putting those configs in the containerprefix
should then be/var/www
(Debian-style), which could be mounted completely or split up into/var/www/site_a
and/var/www/site_b
See also http://nginx.org/en/docs/configure.html
from nginx.
So, the new images will have /etc/nginx/
volume and should be up on the hub in the next 4-5 hours.
Nginx upstream will now be providing and maintaining the images nginxinc/docker-nginx.
from nginx.
Related Issues (10)
- Would you consider adding perl support? HOT 3
- ["nginx"] should be the ENTRYPOINT, not CMD HOT 4
- nginx doesn't use file for name resolution VS docker linking use file for name resolution HOT 1
- Remove this repo? HOT 4
- nginx runs directly as root HOT 11
- Build with packages? HOT 4
- nginx process not receiving SIGHUP HOT 5
- nginx serves corrupted files when files edited in host mounted volume HOT 4
- "WORKDIR /usr/local/nginx/html" assumes I have a /usr/local/nginx/html HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx.