From f2bceb1eac76ce410293b76af5a4bf096924c45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 21 Feb 2024 15:19:12 +0100 Subject: [PATCH] Rename ports --- conf/nginx.conf | 12 ++++++------ manifest.toml | 2 ++ scripts/_common.sh | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4b1b6d1..0b1e684 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,32 +4,32 @@ location / { proxy_set_header Host $host; proxy_set_header X-NginX-Proxy true; - proxy_pass http://localhost:__WEB_ADMIN_PORT__; + proxy_pass http://localhost:__PORT_WEB_ADMIN__; proxy_redirect off; # Socket.io support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_read_timeout 86400s; + proxy_read_timeout 86400s; proxy_send_timeout 86400s; # Include SSOWAT user panel access_by_lua_file /usr/share/ssowat/access.lua; location ~ \.(js|css|woff|woff2|ttf|png) { - proxy_pass http://localhost:__WEB_ADMIN_PORT__; + proxy_pass http://localhost:__PORT_WEB_ADMIN__; } location ~ /webmin { - proxy_pass http://localhost:__WEB_ADMIN_PORT__$uri; + proxy_pass http://localhost:__PORT_WEB_ADMIN__$uri; } location ~ ^/bma(.*)$ { - proxy_pass http://localhost:__LOCAL_BMA_PORT__$1$is_args$args; + proxy_pass http://localhost:__PORT_LOCAL_BMA__$1$is_args$args; } location /ws2p { - proxy_pass http://localhost:__LOCAL_WS2P_PORT__; + proxy_pass http://localhost:__PORT_LOCAL_WS2P__; } } diff --git a/manifest.toml b/manifest.toml index 6509eb0..4f1d3c9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -58,4 +58,6 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.ports] local_bma.default = 10901 local_ws2p.default = 20901 + # Dunno how to configure this… web_admin.default = 9220 + web_admin.fixed = true diff --git a/scripts/_common.sh b/scripts/_common.sh index d5e4d3d..8a5d8b4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,10 +10,10 @@ CONFIGURE_DUNITER() { ynh_exec_as "duniter" duniter --home "$data_dir" config \ - --bma --ipv4 127.0.0.1 --port $bma_local_port --remoteh $domain --remotep 443 --noupnp + --bma --ipv4 127.0.0.1 --port $port_bma_local --remoteh $domain --remotep 443 --noupnp ynh_exec_as "duniter" duniter --home "$data_dir" config \ - --ws2p-host 127.0.0.1 --ws2p-port $ws2p_local_port \ + --ws2p-host 127.0.0.1 --ws2p-port $port_ws2p_local \ --ws2p-remote-host "$domain" --ws2p-remote-port 443 \ --ws2p-remote-path "/ws2p" --ws2p-noupnp