diff --git a/PORTS b/PORTS --- a/PORTS +++ b/PORTS @@ -17,6 +17,7 @@ paas-docker 5000 Docker registry HTTP 9090 Openfire HTTP + 19080 Nasqueron API - Datasources 20080 Nasqueron API - Docker registry API 22220 Phabricator Aphlict (client) 22221 Phabricator Aphlict (admin) diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls --- a/pillar/paas/docker.sls +++ b/pillar/paas/docker.sls @@ -46,6 +46,7 @@ # Nasqueron API microservices - nasqueron/docker-registry-api + - nasqueron/api-datasources # Infrastructure and development services - nasqueron/aphlict @@ -385,6 +386,11 @@ api_entry_point: /docker/registry registry_instance: registry + api-datasources: + api-datasources: + app_port: 19080 + api_entry_point: /datasources + # phpBB SaaS # The SaaS uses a MySQL instance, declared in the MySQL section. diff --git a/roles/paas-docker/containers/api-datasources.sls b/roles/paas-docker/containers/api-datasources.sls new file mode 100644 --- /dev/null +++ b/roles/paas-docker/containers/api-datasources.sls @@ -0,0 +1,29 @@ +# ------------------------------------------------------------- +# Salt — Provision Docker engine +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Project: Nasqueron +# Created: 2020-06-02 +# License: Trivial work, not eligible to copyright +# ------------------------------------------------------------- + +{% set containers = pillar['docker_containers'][grains['id']] %} + +{% for instance, container in containers['api-datasources'].items() %} + +# ------------------------------------------------------------- +# Container +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +{{ instance }}: + docker_container.running: + - detach: True + - interactive: True + - image: nasqueron/api-datasources + - env: + - API_ENTRY_POINT: {{ container['api_entry_point'] }} + - ports: + - 80 + - port_bindings: + - {{ container['app_port'] }}:80 + +{% 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 @@ -40,6 +40,12 @@ include includes/cors-open; } + location /datasources { + proxy_pass http://equatower.nasqueron.org:19080; + include includes/proxy; + include includes/cors-open; + } + location = /servers-log/all.json { include includes/cors-open;