Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767909
D1312.id3368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1312.id3368.diff
View Options
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({}) Y}}
{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 04:12 (4 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259506
Default Alt Text
D1312.id3368.diff (1 KB)
Attached To
Mode
D1312: Create php-fpm pool for api.nasqueron.org/servers-log
Attached
Detach File
Event Timeline
Log In to Comment