madwire / dockercloud-nginx-proxy Goto Github PK
View Code? Open in Web Editor NEWdockercloud-nginx-proxy sets up a container running nginx and, when launched in Docker cloud, will automatically reconfigures itself
License: MIT License
dockercloud-nginx-proxy sets up a container running nginx and, when launched in Docker cloud, will automatically reconfigures itself
License: MIT License
Hi,
this proxy works just fine for most of my applications. Now we also want to deploy applications like atlassian jira within this proxy, where we don't have the possibility to set the internal ports, e.g. confluence runs on port 8090.
It would be very useful to have a VIRTUAL_PORT environment variable as well.
It's reconsigned the number of nodes but doesn't create the same number of containers.
Hello,
I couldn't find a proper example of using FORCE_SSL option with a SSL I gathered from LetsEncrypt?
How should I do it?
Best
This looks like a great project. Do you have a succinct list of pros and cons vs docker clouds standard recommendation of dockercloud/haproxy?
Hi!
I have been trying to get this nginx-proxy up and running for a couple of days now, and I am not certain what I am missing.
The setup consists two services currently on the same node.
When I redeploy my other service I can see from the nginx service logs that it receives the events and reinitialises and rebuilds the nginx configuration. But from what I can see in the logs it only recognizes the nginx service itself and does not build a configuration for service that actually just redeployed.
Mind you that I have tried this setup on different nodes and on the same node and the result is the same. I did of course specify the VIRTUAL_HOST
environment variable on the service i wish to proxy to, and my other service is listening on port 80, but the port is not published.
So currently I gathered one of two possibilities for this not working.
Hope you could point me in the right direction or give me some genereal direction to where I should start debugging.
Dump of the nginx service logs:
dockercloud.1 | I, [2018-03-09T12:35:26.255388 #11] INFO -- : Init Nginx config
dockercloud.1 | I, [2018-03-09T12:35:29.653237 #11] INFO -- : dockercloud-nginx-proxy-ab65de63: ["10.7.0.3"]
dockercloud.1 | I, [2018-03-09T12:35:29.656725 #11] INFO -- : Connecting to wss://ws.cloud.docker.com/api/audit/v1/events
dockercloud.1 | 2018/03/09 12:35:29 [notice] 25#25: signal process started
dockercloud.1 | I, [2018-03-09T12:35:30.081335 #11] INFO -- : Connected!
dockercloud.1 | I, [2018-03-09T12:35:55.174832 #11] INFO -- : Service: - is Redeploying...
dockercloud.1 | I, [2018-03-09T12:36:12.257614 #11] INFO -- : Service: - is Running!
dockercloud.1 | I, [2018-03-09T12:36:20.890809 #11] INFO -- : dockercloud-nginx-proxy-ab65de63: ["10.7.0.3"]
dockercloud.1 | I, [2018-03-09T12:36:20.891694 #11] INFO -- : Writing new nginx config
dockercloud.1 | I, [2018-03-09T12:36:23.895399 #11] INFO -- : Reloding Nginx...
dockercloud.1 | 2018/03/09 12:36:23 [notice] 34#34: signal process started
I forked your repo and added a folder with a Dockerfile, along with your cloned ruby files, for OpenResty 1.9.7.3, located in openresty folder.
I ran your version without any trouble in Docker Cloud. However, when running version with OpenResty (conceivably not much should change) I'm having trouble obtaining the proper configuration settings for ../nginx/nginx.conf and ../nginx/conf.d/default.conf, seems like the default configuration file is not there and does not have the include
statement. Fortunately, the log file outputs messages where I can see that the upstream servers are resolving correctly. So no issues with nginx.conf.erb
and dockercloud.rb
, just not sure how you got the first part of /etc/nginx/nginx.conf customized with the include statement since the FROM directive in your Dockerfile seems to pull from the standard Nginx 1.9.0 image.
For OpenResty image, I based Dockerfile in large part from ficusio/openresty, which I also ran without any issues in Docker Cloud (although it doesn't provide service discovery out of the box).
Any ideas on how this could be configured?
Once it's fixed I'll send you a PR.
In docker stacks you can name your services "web" or "database". The absolute service name will then be e.g. "my-cool-stack.web". If I deploy two of those, the service names are individual for docker itself, not for the dockercloud-nginx-proxy. I currently have a "web" for every stack I booted which leads to that just the first one works.
Since it's just an internal marker, can we use service.uuid instead of service.name? (or maybe service.name + "-" + service.uuid?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.