Page MenuHomeDevCentral

D2293.id.diff
No OneTemporary

D2293.id.diff

diff --git a/roles/paas-docker/nginx/init.sls b/roles/paas-frontend/init.sls
rename from roles/paas-docker/nginx/init.sls
rename to roles/paas-frontend/init.sls
--- a/roles/paas-docker/nginx/init.sls
+++ b/roles/paas-frontend/init.sls
@@ -2,12 +2,10 @@
# Salt — Provision Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2018-03-16
+# Created: 2020-06-03
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- - .software
- - .config
- - .selinux
- - .firewall
+ - .wwwroot-502
+ - .nginx
diff --git a/roles/paas-docker/nginx/config.sls b/roles/paas-frontend/nginx/config.sls
rename from roles/paas-docker/nginx/config.sls
rename to roles/paas-frontend/nginx/config.sls
--- a/roles/paas-docker/nginx/config.sls
+++ b/roles/paas-frontend/nginx/config.sls
@@ -7,7 +7,6 @@
# -------------------------------------------------------------
{% from "map.jinja" import dirs with context %}
-{% set containers = salt['pillar.get']('docker_containers:' + grains['id'], {}) %}
# -------------------------------------------------------------
# Base folder
@@ -62,6 +61,7 @@
ipv4: {{ grains['ipv4'] | join(" ") }}
ipv6: "{{ salt['node.get_ipv6_list']() }}"
+{% for minion, containers in salt['pillar.get']('docker_containers', {}) %}
{% for service, instances in containers.items() %}
{% for instance, container in instances.items() %}
{% if 'host' in container %}
@@ -73,6 +73,7 @@
- template: jinja
- context:
fqdn: {{ container['host'] }}
+ docker_host: {{ minion }}
app_port: {{ container['app_port'] }}
aliases: {{ container['aliases'] | default('', true) | join(" ") }}
# If the nginx configuration needs more key,
@@ -82,3 +83,4 @@
{% endif %}
{% endfor %}
{% endfor %}
+{% endfor %}
diff --git a/roles/paas-docker/nginx/files/includes/geo_nasqueron b/roles/paas-frontend/nginx/files/includes/geo_nasqueron
rename from roles/paas-docker/nginx/files/includes/geo_nasqueron
rename to roles/paas-frontend/nginx/files/includes/geo_nasqueron
diff --git a/roles/paas-docker/nginx/files/includes/letsencrypt b/roles/paas-frontend/nginx/files/includes/letsencrypt
rename from roles/paas-docker/nginx/files/includes/letsencrypt
rename to roles/paas-frontend/nginx/files/includes/letsencrypt
diff --git a/roles/paas-docker/nginx/files/includes/proxy_params b/roles/paas-frontend/nginx/files/includes/proxy_params
rename from roles/paas-docker/nginx/files/includes/proxy_params
rename to roles/paas-frontend/nginx/files/includes/proxy_params
diff --git a/roles/paas-docker/nginx/files/includes/tls b/roles/paas-frontend/nginx/files/includes/tls
rename from roles/paas-docker/nginx/files/includes/tls
rename to roles/paas-frontend/nginx/files/includes/tls
diff --git a/roles/paas-docker/nginx/files/nginx.conf b/roles/paas-frontend/nginx/files/nginx.conf
rename from roles/paas-docker/nginx/files/nginx.conf
rename to roles/paas-frontend/nginx/files/nginx.conf
diff --git a/roles/paas-docker/nginx/files/selinux/nginx.te b/roles/paas-frontend/nginx/files/selinux/nginx.te
rename from roles/paas-docker/nginx/files/selinux/nginx.te
rename to roles/paas-frontend/nginx/files/selinux/nginx.te
diff --git a/roles/paas-docker/nginx/files/vhosts/_default.conf b/roles/paas-frontend/nginx/files/vhosts/_default.conf
rename from roles/paas-docker/nginx/files/vhosts/_default.conf
rename to roles/paas-frontend/nginx/files/vhosts/_default.conf
--- a/roles/paas-docker/nginx/files/vhosts/_default.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/_default.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/acme_dns.conf b/roles/paas-frontend/nginx/files/vhosts/acme_dns.conf
rename from roles/paas-docker/nginx/files/vhosts/acme_dns.conf
rename to roles/paas-frontend/nginx/files/vhosts/acme_dns.conf
--- a/roles/paas-docker/nginx/files/vhosts/acme_dns.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/acme_dns.conf
@@ -56,7 +56,7 @@
return 403;
}
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/auth-grove.conf b/roles/paas-frontend/nginx/files/vhosts/auth-grove.conf
rename from roles/paas-docker/nginx/files/vhosts/auth-grove.conf
rename to roles/paas-frontend/nginx/files/vhosts/auth-grove.conf
--- a/roles/paas-docker/nginx/files/vhosts/auth-grove.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/auth-grove.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/base/fallback.conf b/roles/paas-frontend/nginx/files/vhosts/base/fallback.conf
rename from roles/paas-docker/nginx/files/vhosts/base/fallback.conf
rename to roles/paas-frontend/nginx/files/vhosts/base/fallback.conf
diff --git a/roles/paas-docker/nginx/files/vhosts/base/server.conf b/roles/paas-frontend/nginx/files/vhosts/base/server.conf
rename from roles/paas-docker/nginx/files/vhosts/base/server.conf
rename to roles/paas-frontend/nginx/files/vhosts/base/server.conf
diff --git a/roles/paas-docker/nginx/files/vhosts/cachet.conf b/roles/paas-frontend/nginx/files/vhosts/cachet.conf
rename from roles/paas-docker/nginx/files/vhosts/cachet.conf
rename to roles/paas-frontend/nginx/files/vhosts/cachet.conf
--- a/roles/paas-docker/nginx/files/vhosts/cachet.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/cachet.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/etherpad.conf b/roles/paas-frontend/nginx/files/vhosts/etherpad.conf
rename from roles/paas-docker/nginx/files/vhosts/etherpad.conf
rename to roles/paas-frontend/nginx/files/vhosts/etherpad.conf
--- a/roles/paas-docker/nginx/files/vhosts/etherpad.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/etherpad.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
proxy_buffering off;
diff --git a/roles/paas-docker/nginx/files/vhosts/jenkins.conf b/roles/paas-frontend/nginx/files/vhosts/jenkins.conf
rename from roles/paas-docker/nginx/files/vhosts/jenkins.conf
rename to roles/paas-frontend/nginx/files/vhosts/jenkins.conf
--- a/roles/paas-docker/nginx/files/vhosts/jenkins.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/jenkins.conf
@@ -34,7 +34,7 @@
location / {
proxy_redirect http:// https://;
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
diff --git a/roles/paas-docker/nginx/files/vhosts/openfire.conf b/roles/paas-frontend/nginx/files/vhosts/openfire.conf
rename from roles/paas-docker/nginx/files/vhosts/openfire.conf
rename to roles/paas-frontend/nginx/files/vhosts/openfire.conf
diff --git a/roles/paas-docker/nginx/files/vhosts/phabricator.conf b/roles/paas-frontend/nginx/files/vhosts/phabricator.conf
rename from roles/paas-docker/nginx/files/vhosts/phabricator.conf
rename to roles/paas-frontend/nginx/files/vhosts/phabricator.conf
--- a/roles/paas-docker/nginx/files/vhosts/phabricator.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/phabricator.conf
@@ -41,7 +41,7 @@
include includes/proxy_params;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
}
location ~ ^/maniphest/task/create {
@@ -49,7 +49,7 @@
}
location = /ws/ {
- proxy_pass http://localhost:22280;
+ proxy_pass http://{{ docker_host }}:22280;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@@ -85,7 +85,7 @@
include includes/proxy_params;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
}
}
@@ -115,7 +115,7 @@
include includes/proxy_params;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
}
# Fixes invalid URLs resolved to phame instead of DevCentral
diff --git a/roles/paas-docker/nginx/files/vhosts/pixelfed.conf b/roles/paas-frontend/nginx/files/vhosts/pixelfed.conf
rename from roles/paas-docker/nginx/files/vhosts/pixelfed.conf
rename to roles/paas-frontend/nginx/files/vhosts/pixelfed.conf
--- a/roles/paas-docker/nginx/files/vhosts/pixelfed.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/pixelfed.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/registry.conf b/roles/paas-frontend/nginx/files/vhosts/registry.conf
rename from roles/paas-docker/nginx/files/vhosts/registry.conf
rename to roles/paas-frontend/nginx/files/vhosts/registry.conf
--- a/roles/paas-docker/nginx/files/vhosts/registry.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/registry.conf
@@ -42,7 +42,7 @@
client_max_body_size 0;
chunked_transfer_encoding on;
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
diff --git a/roles/paas-docker/nginx/files/vhosts/sentry.conf b/roles/paas-frontend/nginx/files/vhosts/sentry.conf
rename from roles/paas-docker/nginx/files/vhosts/sentry.conf
rename to roles/paas-frontend/nginx/files/vhosts/sentry.conf
--- a/roles/paas-docker/nginx/files/vhosts/sentry.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/sentry.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/files/vhosts/tommy.conf b/roles/paas-frontend/nginx/files/vhosts/tommy.conf
rename from roles/paas-docker/nginx/files/vhosts/tommy.conf
rename to roles/paas-frontend/nginx/files/vhosts/tommy.conf
--- a/roles/paas-docker/nginx/files/vhosts/tommy.conf
+++ b/roles/paas-frontend/nginx/files/vhosts/tommy.conf
@@ -33,7 +33,7 @@
include includes/letsencrypt;
location / {
- proxy_pass http://localhost:{{ app_port }};
+ proxy_pass http://{{ docker_host }}:{{ app_port }};
include includes/proxy_params;
}
diff --git a/roles/paas-docker/nginx/firewall.sls b/roles/paas-frontend/nginx/firewall.sls
rename from roles/paas-docker/nginx/firewall.sls
rename to roles/paas-frontend/nginx/firewall.sls
diff --git a/roles/paas-docker/nginx/init.sls b/roles/paas-frontend/nginx/init.sls
rename from roles/paas-docker/nginx/init.sls
rename to roles/paas-frontend/nginx/init.sls
diff --git a/roles/paas-docker/nginx/selinux.sls b/roles/paas-frontend/nginx/selinux.sls
rename from roles/paas-docker/nginx/selinux.sls
rename to roles/paas-frontend/nginx/selinux.sls
diff --git a/roles/paas-docker/nginx/software.sls b/roles/paas-frontend/nginx/software.sls
rename from roles/paas-docker/nginx/software.sls
rename to roles/paas-frontend/nginx/software.sls
diff --git a/roles/paas-docker/wwwroot-502/init.sls b/roles/paas-frontend/wwwroot-502/init.sls
rename from roles/paas-docker/wwwroot-502/init.sls
rename to roles/paas-frontend/wwwroot-502/init.sls

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 01:50 (1 h, 2 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263723
Default Alt Text
D2293.id.diff (12 KB)

Event Timeline