Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3775805
D1736.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
D1736.diff
View Options
diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -149,6 +149,7 @@
aliases:
- pad.wolfplex.org
- pad.wolfplex.be
+ credential: 125
mysql_link: acquisitariat
# phpBB SaaS
diff --git a/roles/paas-docker/containers/etherpad.sls b/roles/paas-docker/containers/etherpad.sls
--- a/roles/paas-docker/containers/etherpad.sls
+++ b/roles/paas-docker/containers/etherpad.sls
@@ -46,12 +46,24 @@
- port_bindings:
- {{ container['app_port'] }}:9001
-pad_deploy_api:
+# -------------------------------------------------------------
+# API key
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% set api_key_path = "/srv/" + instance + "/APIKEY.txt" %}
+
+{{ api_key_path }}:
+ file.managed:
+ - mode: 400
+ - contents: {{ salt['zr.get_password'](container['credential']) }}
+
+deploy_api_key_{{ instance }}:
cmd.run:
- - creates: /srv/{{ instance }}/.ok-apikey
- name: |
- docker cp /srv/{{ instance }}/var/APIKEY.txt {{ instance }}:opt/etherpad-lite/APIKEY.txt
+ docker cp {{ api_key_path }} {{ instance }}:opt/etherpad-lite/APIKEY.txt
docker restart {{ instance }}
- touch /srv/{{ instance }}/.ok-apikey
+ - onchanges:
+ - docker_container: {{ instance }}
+ - file: {{ api_key_path }}
{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 19:56 (21 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263119
Default Alt Text
D1736.diff (1 KB)
Attached To
Mode
D1736: Provide Etherpad API key to container
Attached
Detach File
Event Timeline
Log In to Comment