Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767894
D1312.id3370.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.id3370.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,12 +50,20 @@
command: /usr/local/sbin/php-fpm
web_php_sites:
+ # Nasqueron members
www.dereckson.be:
user: web-be-dereckson-www
source: wwwroot/dereckson.be/www
target: /var/wwwroot/dereckson.be/www
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 04:06 (20 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259235
Default Alt Text
D1312.id3370.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