Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for 0.3 #12

Merged
merged 1 commit into from
Jan 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ test:
pre:
- docker run -d -p 8500:8500 e96tech/consul-server -advertise 127.0.0.1 -bootstrap -dc circle -domain local
- curl --retry 10 --retry-delay 5 -v http://localhost:8500
- sed -i '1i load_module "modules/ngx_stream_module.so";' /home/ubuntu/vergilius/src/vergilius/templates/service_validate.html

deployment:
dockerhub_master:
Expand Down
2 changes: 2 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
user root;
worker_processes 4;

load_module "modules/ngx_stream_module.so";

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zope.component==4.2.2
zope.event==4.1.0
zope.interface==4.1.3
python-consul==0.4.7
python-consul==0.7.0
tornado==4.3
funcsigs==1.0.0
mock==1.3.0
8 changes: 7 additions & 1 deletion src/vergilius/loop/nginx_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

import vergilius

try:
from subprocess import DEVNULL # py3k
except ImportError:
import os
DEVNULL = open(os.devnull, 'wb')


class NginxReloader(object):
nginx_update_event = Event()
Expand All @@ -18,7 +24,7 @@ def nginx_reload(cls):
yield cls.nginx_update_event.wait()
cls.nginx_update_event.clear()
vergilius.logger.info('[nginx]: reload')
subprocess.check_call([vergilius.config.NGINX_BINARY, '-s', 'reload'], stdout=subprocess.DEVNULL)
subprocess.check_call([vergilius.config.NGINX_BINARY, '-s', 'reload'], stdout=DEVNULL)

@classmethod
def queue_reload(cls):
Expand Down
2 changes: 2 additions & 0 deletions src/vergilius/templates/service_validate.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load_module "modules/ngx_stream_module.so";

worker_processes 1;

pid {{pid_file}};
Expand Down