| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- {% import 'globals.jinja' as globals %}
- {% import 'circusd/lib.jinja' as circusd %}
- {% set settings = pillar['clients']['andrew']['xword'] %}
- include:
- - clients.andrew
- - generic_packages.python3_6
- - generic_packages.libsm6
- - generic_packages.libxrender1
- /etc/nginx/sites-enabled/xword:
- file.managed:
- - source: salt://clients/andrew/xword/files/xword.nginx
- - template: jinja
- - context:
- settings: {{ settings }}
- - require:
- - file: nginx_conf
- - watch_in:
- - service: nginx
- /data/clients/andrew/xword:
- file.directory:
- - require:
- - file: /data/clients/andrew
- /data/clients/andrew/xword/static:
- file.directory:
- - require:
- - file: /data/clients/andrew/xword
- - git: xword
- xword:
- git.latest:
- - name: git@git.codefans.co.za:andrew/xword.git
- - target: /data/clients/andrew/xword
- - rev: {{ settings.rev }}
- - identity: {{ globals.config.git.identity_file }}
- - require:
- - file: /data/clients/andrew/xword
- {{ circusd.circusd_watcher_running() }}
- {{ circusd.circusd_watcher_configuration(
- 'xword',
- 'salt://clients/andrew/xword/files/xword.ini',
- {'settings': settings},
- [],
- [
- 'git: xword',
- 'file: xword_config',
- 'virtualenv: /data/virtualenvs/xword',
- ]
- ) }}
- /data/virtualenvs/xword:
- virtualenv.managed:
- - python: /usr/bin/python3.6
- - requirements: /data/clients/andrew/xword/requirements.txt
- - require:
- - pkg: python3_6
- - file: /data/virtualenvs
- - git: xword
- xword_config:
- file.managed:
- - name: /data/clients/andrew/xword/xword/settings_local.py
- - source: salt://clients/andrew/xword/files/settings_local.py
- - template: jinja
- - require:
- - git: xword
- xword_collectstatic:
- cmd.run:
- - name: /data/virtualenvs/xword/bin/python3 /data/clients/andrew/xword/manage.py collectstatic --noinput --verbosity 0 --clear --link
- - require:
- - file: /data/clients/andrew/xword/static
- - onchanges:
- - virtualenv: /data/virtualenvs/xword
- - git: xword
- - file: xword_config
|