Page MenuHomeDevCentral

D1517.id3871.diff
No OneTemporary

D1517.id3871.diff

diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -27,6 +27,8 @@
# Continuous deployment jobs
- jenkinsci/jenkins
- nasqueron/jenkins-slave-php
+ # phpBB SaaS
+ - nasqueron/mysql
docker_containers:
equatower:
@@ -39,3 +41,5 @@
ip: 172.17.0.100
elapsi:
ip: 172.17.0.101
+ # phpBB SaaS
+ phpbb_db: {}
diff --git a/roles/paas-docker/containers/phpbb_db.sls b/roles/paas-docker/containers/phpbb_db.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/phpbb_db.sls
@@ -0,0 +1,43 @@
+# -------------------------------------------------------------
+# 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) %}
+
+# -------------------------------------------------------------
+# Home directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/phpbb/mysql:
+ file.directory:
+ - user: 999
+ - group: 999
+ - makedirs: True
+
+{% if has_selinux %}
+selinux_context_phpbb_mysql_data:
+ selinux.fcontext_policy_present:
+ - name: /srv/phpbb/mysql
+ - sel_type: svirt_sandbox_file_t
+
+selinux_context_phpbb_mysql_data_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/phpbb/mysql
+{% endif %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+phpbb_db:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: nasqueron/mysql
+ - binds: /srv/phpbb/mysql:/var/lib/mysql
+ - environment:
+ MYSQL_ROOT_PASSWORD: {{ salt['random.get_str'](31) }}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 07:19 (14 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257771
Default Alt Text
D1517.id3871.diff (1 KB)

Event Timeline