Page MenuHomeDevCentral

D2721.id6898.diff
No OneTemporary

D2721.id6898.diff

diff --git a/PORTS b/PORTS
--- a/PORTS
+++ b/PORTS
@@ -17,6 +17,7 @@
paas-docker
5000 Docker registry HTTP
9090 Openfire HTTP
+ 18080 Nasqueron API - API clean URL
19080 Nasqueron API - Datasources
20080 Nasqueron API - Docker registry API
22220 Phabricator Aphlict (client)
diff --git a/roles/paas-docker/containers/api-url-cleaner.sls b/roles/paas-docker/containers/api-url-cleaner.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/containers/api-url-cleaner.sls
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+{% set containers = pillar['docker_containers'][grains['id']] %}
+
+{% for instance, container in containers['api-url-cleaner'].items() %}
+
+# -------------------------------------------------------------
+# Container
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ instance }}:
+ docker_container.running:
+ - detach: True
+ - interactive: True
+ - image: nasqueron/api-url-cleaner
+ - ports:
+ - 8000
+ - port_bindings:
+ - {{ container['app_port'] }}:8000
+
+{% endfor %}
diff --git a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
--- a/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
+++ b/roles/webserver-legacy/nginx/files/vhosts/nasqueron.org/api.conf
@@ -75,6 +75,12 @@
include includes/proxy;
include includes/cors-open;
}
+
+ location /web/clean-url {
+ proxy_pass http://docker-001.nasqueron.org:19080/;
+ include includes/proxy;
+ include includes/cors-open;
+ }
}
server {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 22:25 (19 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265173
Default Alt Text
D2721.id6898.diff (1 KB)

Event Timeline