Page MenuHomeDevCentral

D1520.diff
No OneTemporary

D1520.diff

diff --git a/pillar/saas/phpbb.sls b/pillar/saas/phpbb.sls
new file mode 100644
--- /dev/null
+++ b/pillar/saas/phpbb.sls
@@ -0,0 +1,14 @@
+# -------------------------------------------------------------
+# Salt — phpBB managed installations
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+phpbb_datastores:
+ # Staging installation
+ - phpbb.test.ook.space
+ # Forum hosted on Nasqueron
+ - forum.espace-win.org
+ - utopia.espace-win.org
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -19,6 +19,7 @@
- paas.docker
equatower:
- paas.docker
+ - saas.phpbb
ysul:
- devserver.repos
- saas.mediawiki
diff --git a/roles/paas-docker/containers/phpbb.sls b/roles/paas-docker/containers/phpbb.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/phpbb.sls
@@ -0,0 +1,45 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-27
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+
+# -------------------------------------------------------------
+# Data directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/phpbb/data:
+ file.directory:
+ - user: 431
+ - group: 433
+ - makedirs: True
+
+{% if has_selinux %}
+selinux_context_phpbb_datastores:
+ selinux.fcontext_policy_present:
+ - name: /srv/phpbb/data
+ - sel_type: svirt_sandbox_file_t
+
+selinux_context_phpbb_datastores_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/phpbb/data
+{% endif %}
+
+{% for store in pillar['phpbb_datastores'] %}
+/srv/phpbb/data/{{ store }}:
+ file.directory:
+ - user: 431
+ - group: 433
+
+{% for subdir in ['cache', 'config', 'ext', 'files', 'images', 'store'] %}
+/srv/phpbb/data/{{ store }}/{{ subdir }}:
+ file.recurse:
+ - source: salt://software/phpbb/phpBB/{{ subdir }}
+ - user: 431
+ - group: 433
+{% endfor %}
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 04:38 (17 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257189
Default Alt Text
D1520.diff (2 KB)

Event Timeline