Commit e935595d by Clinton Blackburn

Merge pull request #1664 from edx/insights-rjs

Added play to run r.js for Insights
parents 2fc42d2d b38ec4c1
......@@ -123,6 +123,7 @@ insights_log_dir: "{{ COMMON_LOG_DIR }}/{{ insights_service_name }}"
insights_nodeenv_dir: "{{ insights_home }}/nodeenvs/{{ insights_service_name }}"
insights_nodeenv_bin: "{{ insights_nodeenv_dir }}/bin"
insights_node_modules_dir: "{{ insights_code_dir }}/node_modules"
insights_node_bin: "{{ insights_node_modules_dir }}/.bin"
insights_gunicorn_host: "127.0.0.1"
insights_gunicorn_port: "8110"
......
......@@ -52,6 +52,7 @@
- name: create nodeenv
shell: >
creates={{ insights_nodeenv_dir }}
{{ insights_venv_bin }}/nodeenv {{ insights_nodeenv_dir }}
sudo_user: "{{ insights_user }}"
......@@ -62,7 +63,7 @@
- name: install bower dependencies
shell: >
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_modules_dir }}/.bin/bower install --production --config.interactive=false
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/bower install --production --config.interactive=false
sudo_user: "{{ insights_user }}"
- name: syncdb and migrate
......@@ -75,6 +76,12 @@
environment: "{{ insights_environment }}"
when: migrate_db is defined and migrate_db|lower == "yes"
- name: run r.js optimizer
shell: >
chdir={{ insights_code_dir }}
. {{ insights_nodeenv_bin }}/activate && {{ insights_node_bin }}/r.js -o build.js
sudo_user: "{{ insights_user }}"
- name: run collectstatic
shell: >
chdir={{ insights_code_dir }}
......
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