Skip to content

Commit

Permalink
update nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
framitdavid committed Feb 6, 2024
1 parent 958674c commit d42ccfd
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions development/load-balancer/nginx.conf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ http {

sendfile on;

map $container_manager_tool $container_runetime_internal_host {
default http://host.docker.internal;
docker http://host.docker.internal;
podman http://host.podman.internal;
}

upstream designer {
server host.docker.internal:6000;
server host.podman.internal:6000;
Expand All @@ -42,7 +36,6 @@ http {
}

server {
set $container_manager_tool $CONTAINER_MANAGER_TOOL;
set $dev_app_development $DEVELOP_APP_DEVELOPMENT;
set $dev_resource_admin $DEVELOP_RESOURCE_ADMIN;
set $dev_app_preview $DEVELOP_PREVIEW;
Expand All @@ -68,7 +61,7 @@ http {
if ($dev_dashboard) {
add_header X-Dashboard-Source webpackDash;
rewrite /designer/frontend/dashboard/(.*) /$1 break;
proxy_pass $container_runetime_internal_host:2003;
proxy_pass http://host.containers.internal:2003;
}

if ($dev_dashboard != 1) {
Expand All @@ -83,7 +76,7 @@ http {
if ($dev_app_development) {
add_header X-Dashboard-Source webpackAppDev;
rewrite /designer/frontend/app-development/(.*) /$1 break;
proxy_pass $container_runetime_internal_host:2004;
proxy_pass http://host.containers.internal:2004;
}
if ($dev_app_development != 1) {
add_header X-Dashboard-Source dockerAppDev;
Expand All @@ -98,7 +91,7 @@ http {
if ($dev_resource_admin) {
add_header X-Dashboard-Source webpackAppDev;
rewrite /designer/frontend/resourceadm/(.*) /$1 break;
proxy_pass $container_runetime_internal_host:2023;
proxy_pass http://host.containers.internal:2023;
}
if ($dev_resource_admin != 1) {
add_header X-Dashboard-Source dockerAppDev;
Expand All @@ -112,7 +105,7 @@ http {
if ($dev_app_preview) {
add_header X-Dashboard-Source webpackAppDev;
rewrite /designer/frontend/app-preview/(.*) /$1 break;
proxy_pass $container_runetime_internal_host:2005;
proxy_pass http://host.containers.internal:2005;
}
if ($dev_app_preview != 1) {
add_header X-Dashboard-Source dockerAppDev;
Expand All @@ -126,7 +119,7 @@ http {
if ($dev_studio_root) {
add_header X-Dashboard-Source webpackDash;
rewrite /designer/frontend/studio-root/(.*) /$1 break;
proxy_pass $container_runetime_internal_host:2002;
proxy_pass http://host.containers.internal:2002;
}
if ($dev_studio_root != 1) {
add_header X-Dashboard-Source dockerDash;
Expand All @@ -141,7 +134,7 @@ http {
proxy_set_header Host $host;
if ($dev_backend) {
add_header X-Dashboard-Source dotnetPaths;
proxy_pass $container_runetime_internal_host:5000;
proxy_pass http://host.containers.internal:5000;
}
if ($dev_backend != 1) {
add_header X-Dashboard-Source dockerPaths;
Expand All @@ -164,7 +157,7 @@ http {
proxy_set_header Host $host;
if ($dev_backend) {
add_header X-Dashboard-Source dotnetPaths;
proxy_pass $container_runetime_internal_host:5000;
proxy_pass http://host.containers.internal:5000;
}
if ($dev_backend != 1) {
add_header X-Dashboard-Source dockerPaths;
Expand All @@ -175,7 +168,7 @@ http {
location / {
if ($dev_backend) {
add_header X-Dashboard-Source dotnetRoot;
proxy_pass $container_runetime_internal_host:5000;
proxy_pass http://host.containers.internal:5000;
}
if ($dev_backend != 1) {
add_header X-Dashboard-Source dockerRoot;
Expand Down

0 comments on commit d42ccfd

Please sign in to comment.