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 {