fix(apps): stabilize saleor and netbird release paths

This commit is contained in:
archipelago
2026-05-20 20:38:52 -04:00
parent 556f2e7cac
commit cc1f8fba72
8 changed files with 146 additions and 38 deletions
+17 -8
View File
@@ -271,6 +271,7 @@ async fn repair_saleor_network_aliases() {
.output()
.await;
}
}
async fn run_required_stack_command(
@@ -1740,9 +1741,14 @@ impl RpcHandler {
let secret_key = super::config::read_or_generate_secret("saleor-secret-key").await;
let admin_pass = super::config::read_or_generate_secret("saleor-admin-password").await;
let host_ip = &self.config.host_ip;
let dashboard_url = format!("http://{}:9010/", host_ip);
let dashboard_origin = format!("http://{}:9010", host_ip);
let dashboard_url = format!("{}/", dashboard_origin);
let api_url = format!("http://{}:8000/graphql/", host_ip);
let allowed_hosts = format!("localhost,127.0.0.1,api,saleor-api,{}", host_ip);
let allowed_client_hosts = format!(
"{},http://localhost:9010,http://127.0.0.1:9010",
dashboard_origin
);
let database_url = format!("postgres://saleor:{}@db/saleor", db_pass);
let mut db_cmd = tokio::process::Command::new("podman");
@@ -1884,6 +1890,10 @@ impl RpcHandler {
"-e".to_string(),
format!("DASHBOARD_URL={}", dashboard_url),
"-e".to_string(),
format!("ALLOWED_CLIENT_HOSTS={}", allowed_client_hosts),
"-e".to_string(),
format!("ALLOWED_GRAPHQL_ORIGINS={}", allowed_client_hosts),
"-e".to_string(),
format!("ALLOWED_HOSTS={}", allowed_hosts),
];
@@ -2182,10 +2192,9 @@ LETSENCRYPT_DOMAIN=none
listen 80;
server_name _;
# Route API/auth through the host-published server port. Rootless Podman
# can give netbird-server a new container IP on restart while nginx keeps
# an old resolved address, which breaks login with 502s.
set $netbird_server http://169.254.1.2:8086;
# Route browser API/auth through the host-published server port. Rootless
# Podman can give netbird-server a new container IP on restart while nginx
# keeps an old resolved address, which breaks login with 502s.
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -2194,17 +2203,17 @@ LETSENCRYPT_DOMAIN=none
proxy_http_version 1.1;
location ~ ^/(relay|ws-proxy/) {{
proxy_pass $netbird_server;
proxy_pass http://host.containers.internal:8086;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 1d;
}}
location ~ ^/(api|oauth2)(/|$) {{
proxy_pass $netbird_server;
proxy_pass http://host.containers.internal:8086;
}}
location ~ ^/(signalexchange\.SignalExchange|management\.ManagementService)/ {{
location ~ ^/(signalexchange\.SignalExchange|management\.ManagementService|management\.ProxyService)/ {{
grpc_pass grpc://netbird-server:80;
grpc_read_timeout 1d;
grpc_send_timeout 1d;