Browse Source

Salt: ensure that the site-icons.css file exists

The generate_site_icons_css cronjob will create this file, but the site
won't work before it exists, so there's a (less than 5 min) gap where
the site is broken when first set up. This probably won't be noticeable
in dev/prod setups, but breaks things like CI setups where everything is
getting created freshly each time.

This makes sure that the file always exists on initial setup and
whenever the Salt states are re-run.
merge-requests/111/merge
Deimos 4 years ago
parent
commit
e85dfa2492
  1. 11
      salt/salt/webassets.sls

11
salt/salt/webassets.sls

@ -1,4 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir %}
{% from 'common.jinja2' import app_dir, app_username %}
# webassets will crash the site unless this file exists, make sure it's always there
{{ app_dir }}/static/css/site-icons.css:
file.managed:
- user: {{ app_username }}
- group: {{ app_username }}
- mode: 644
- create: True
- replace: False
/etc/systemd/system/webassets.service:
file.managed:

Loading…
Cancel
Save