Commit b79a0439 by Vik Paruchuri

Fix some commands, change nginx port to 80 to avoid redirect problems

parent 6ae724e4
......@@ -89,7 +89,7 @@
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py collectstatic --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: django update_index for ml-service-api
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py update_index --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}"
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py update_index --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: render celery service from template
template: src=celery.conf.j2 dest=/etc/init/celery.conf
......
server {
listen {{nginx_listen_port}};
server_name {{ansible_hostname}};
server_name localhost;
# https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-production
location /static/ { # STATIC_URL
......@@ -15,6 +15,11 @@ server {
}
location / {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:7999;
}
}
......
......@@ -7,4 +7,4 @@ nltk_data_dir: /usr/share/nltk_data
remote_user: ubuntu
ml_branch: master
ml_api_branch: dev
nginx_listen_port: 8888
\ No newline at end of file
nginx_listen_port: 80
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment