Page MenuHomeDevCentral

D3300.id8495.diff
No OneTemporary

D3300.id8495.diff

diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -48,6 +48,7 @@
46555 Airflow - Flower
47080 Jenkins HTTP - Test
48080 Vault - Notifications - Integration
+ 49080 Corspat HTTP
50000 Jenkins controller's port for JNLP-based Jenkins agents - CD
52000 Jenkins controller's port for JNLP-based Jenkins agents - Test
55000 Jenkins controller's port for JNKP-based Jenkins agents - CI
diff --git a/pillar/credentials/vault.sls b/pillar/credentials/vault.sls
--- a/pillar/credentials/vault.sls
+++ b/pillar/credentials/vault.sls
@@ -177,6 +177,7 @@
# Format: <project name>.<service>.<type>
#
+ - ops/secrets/corspat/smtp
- ops/secrets/dbserver/cluster-A/users/corspat
- ops/secrets/espacewin.phpbb.mysql_root
diff --git a/pillar/paas/docker/docker-002/corspat.sls b/pillar/paas/docker/docker-002/corspat.sls
new file mode 100644
--- /dev/null
+++ b/pillar/paas/docker/docker-002/corspat.sls
@@ -0,0 +1,12 @@
+docker_images:
+ - codrlabs/corspat
+
+docker_containers:
+ corspat:
+ corspat:
+ app_port: 49080
+ host: corspat.nasqueron.org
+ db: db-A
+ credentials:
+ db: dbserver/cluster-A/users/corspat
+ mail: corspat/smtp
diff --git a/roles/paas-docker/containers/corspat.sls b/roles/paas-docker/containers/corspat.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/corspat.sls
@@ -0,0 +1,32 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% for instance, container in pillar['docker_containers']['corspat'].items() %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% set dsn = salt["credentials.get_dsn"](pillar["nasqueron_services"][container["db"]], container["credentials"]["db"]) %}
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: codrlabs/corspat
+ - env:
+ - DATABASE_URL=postgres://{{ dsn }}/corspat
+ - DATABASE_URL_PSYCOPG=postgresql+psycopg2://{{ dsn }}/corspat
+
+ - MAIL_USERNAME={{ salt["credentials.get_username"](container["credentials"]["mail"]) }}
+ - MAIL_PASSWORD={{ salt["credentials.get_password"](container["credentials"]["mail"]) }}
+ - ports:
+ - 5000
+ - port_bindings:
+ - {{ container['app_port'] }}:5000
+
+{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 22:57 (13 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263424
Default Alt Text
D3300.id8495.diff (2 KB)

Event Timeline