Permalink
Browse files

Properly restart apache after changes

  • Loading branch information...
athos-ribeiro committed May 26, 2018
1 parent e591564 commit 7f4a16aee01d38a25ebacac3da2e42d800047df0
Showing with 16 additions and 6 deletions.
  1. +16 −6 salt/obs.sls
View
@@ -61,18 +61,28 @@ enable_obs_site:
- user
- group
reload_apache:
service.running:
- name: apache2
- enable: True
- reload: True
{% if salt['grains.get']('db_setup') != 'done' %}
setup_database:
cmd.run:
- name: "RAILS_ENV=production bundle exec rake db:setup"
- cwd: /usr/share/obs/api
grains.present:
- name: db_setup
- value: done
{% endif %}
compile_assets:
cmd.run:
- name: "RAILS_ENV=production bundle exec rake assets:precompile"
- cwd: /usr/share/obs/api
restart_apache:
service.running:
- name: apache2
- enable: True
- watch_any:
- enable_obs_site
- disable_default_apache2_site
- file: /var/log/obs
- file: /usr/share/obs/api
- compile_assets

0 comments on commit 7f4a16a

Please sign in to comment.