Page MenuHomeDevCentral

D1312.id3369.diff
No OneTemporary

D1312.id3369.diff

diff --git a/pillar/webserver/sites.sls b/pillar/webserver/sites.sls
--- a/pillar/webserver/sites.sls
+++ b/pillar/webserver/sites.sls
@@ -50,6 +50,7 @@
command: /usr/local/sbin/php-fpm
web_php_sites:
+ # Nasqueron members
www.dereckson.be:
user: web-be-dereckson-www
source: wwwroot/dereckson.be/www
@@ -57,6 +58,13 @@
autochmod: True
php-fpm: prod
+ # Directly managed by Nasqueron
+ api.nasqueron.org:
+ user: web-org-nasqueron-api-serverslog
+ php-fpm: prod
+ env:
+ SERVERS_LOG_FILE: /srv/api/data/servers-log-all.json
+
# -------------------------------------------------------------
# States
#
diff --git a/roles/webserver-legacy/php-sites/files.sls b/roles/webserver-legacy/php-sites/files.sls
--- a/roles/webserver-legacy/php-sites/files.sls
+++ b/roles/webserver-legacy/php-sites/files.sls
@@ -11,6 +11,8 @@
{% for domain, site in pillar['web_php_sites'].iteritems() %}
+{% if 'target' in site %}
+
{{ site['target'] }}:
file.recurse:
- source: salt://{{ site['source'] }}
@@ -21,4 +23,6 @@
- user: {{ site['user'] }}
- group: web
+{% endif %}
+
{% endfor %}
diff --git a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
--- a/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
+++ b/roles/webserver-legacy/php-sites/files/php-fpm-pool.conf
@@ -26,3 +26,7 @@
pm.max_children = 10
pm.process_idle_timeout = 10s
pm.max_requests = 200
+
+{%- for key, value in env.iteritems() %}
+env["{{ key }}"] = {{ value }}
+{% endfor -%}
diff --git a/roles/webserver-legacy/php-sites/php-fpm.sls b/roles/webserver-legacy/php-sites/php-fpm.sls
--- a/roles/webserver-legacy/php-sites/php-fpm.sls
+++ b/roles/webserver-legacy/php-sites/php-fpm.sls
@@ -40,6 +40,7 @@
- context:
domain: {{ domain }}
user: {{ site['user' ]}}
+ env : {{ site['env']|default({}) }}
{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 04:21 (4 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259521
Default Alt Text
D1312.id3369.diff (1 KB)

Event Timeline