Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3765606
D2721.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D2721.diff
View Options
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/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -434,6 +434,10 @@
app_port: 19080
api_entry_point: /datasources
+ api-url-cleaner:
+ api-url-cleaner:
+ app_port: 18080
+
# phpBB SaaS
# The SaaS uses a MySQL instance, declared in the MySQL section.
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:18080/;
+ include includes/proxy;
+ include includes/cors-open;
+ }
}
server {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 13:15 (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258083
Default Alt Text
D2721.diff (2 KB)
Attached To
Mode
D2721: Serve API URL cleaner
Attached
Detach File
Event Timeline
Log In to Comment