fix: Use PORT env var instead of BOTSERVER_PORT, default to port 9000
- Change BOTSERVER_PORT to PORT for consistency with .env.embedded - Update default port from 8080 to 9000 in config - Fix service port references in security integration - Update directory setup ExternalPort to 9000 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c264ad1294
commit
848b875698
3 changed files with 15 additions and 15 deletions
|
|
@ -291,10 +291,10 @@ impl AppConfig {
|
||||||
smtp_server: get_str("EMAIL_SMTP_SERVER", "smtp.gmail.com"),
|
smtp_server: get_str("EMAIL_SMTP_SERVER", "smtp.gmail.com"),
|
||||||
smtp_port: get_u16("EMAIL_SMTP_PORT", 587),
|
smtp_port: get_u16("EMAIL_SMTP_PORT", 587),
|
||||||
};
|
};
|
||||||
let port = std::env::var("BOTSERVER_PORT")
|
let port = std::env::var("PORT")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|v| v.parse::<u16>().ok())
|
.and_then(|v| v.parse::<u16>().ok())
|
||||||
.unwrap_or_else(|| get_u16("server_port", 8080));
|
.unwrap_or_else(|| get_u16("server_port", 9000));
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
drive,
|
drive,
|
||||||
|
|
@ -302,7 +302,7 @@ impl AppConfig {
|
||||||
server: ServerConfig {
|
server: ServerConfig {
|
||||||
host: get_str("server_host", "0.0.0.0"),
|
host: get_str("server_host", "0.0.0.0"),
|
||||||
port,
|
port,
|
||||||
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| "http://localhost:8080".to_string()),
|
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| "http://localhost:9000".to_string()),
|
||||||
},
|
},
|
||||||
site_path: {
|
site_path: {
|
||||||
ConfigManager::new(pool.clone()).get_config(
|
ConfigManager::new(pool.clone()).get_config(
|
||||||
|
|
@ -329,10 +329,10 @@ impl AppConfig {
|
||||||
smtp_server: "smtp.gmail.com".to_string(),
|
smtp_server: "smtp.gmail.com".to_string(),
|
||||||
smtp_port: 587,
|
smtp_port: 587,
|
||||||
};
|
};
|
||||||
let port = std::env::var("BOTSERVER_PORT")
|
let port = std::env::var("PORT")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|v| v.parse::<u16>().ok())
|
.and_then(|v| v.parse::<u16>().ok())
|
||||||
.unwrap_or(8080);
|
.unwrap_or(9000);
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
drive: minio,
|
drive: minio,
|
||||||
|
|
@ -340,7 +340,7 @@ impl AppConfig {
|
||||||
server: ServerConfig {
|
server: ServerConfig {
|
||||||
host: "0.0.0.0".to_string(),
|
host: "0.0.0.0".to_string(),
|
||||||
port,
|
port,
|
||||||
base_url: "http://localhost:8080".to_string(),
|
base_url: "http://localhost:9000".to_string(),
|
||||||
},
|
},
|
||||||
|
|
||||||
site_path: "./botserver-stack/sites".to_string(),
|
site_path: "./botserver-stack/sites".to_string(),
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,7 @@ impl DirectorySetup {
|
||||||
_org_id: &str,
|
_org_id: &str,
|
||||||
) -> Result<(String, String, String)> {
|
) -> Result<(String, String, String)> {
|
||||||
let app_name = "BotServer";
|
let app_name = "BotServer";
|
||||||
let redirect_uri = "http://localhost:8080/auth/callback".to_string();
|
let redirect_uri = "http://localhost:9000/auth/callback".to_string();
|
||||||
|
|
||||||
let project_response = self
|
let project_response = self
|
||||||
.client
|
.client
|
||||||
|
|
@ -362,7 +362,7 @@ impl DirectorySetup {
|
||||||
"grantTypes": ["OIDC_GRANT_TYPE_AUTHORIZATION_CODE", "OIDC_GRANT_TYPE_REFRESH_TOKEN", "OIDC_GRANT_TYPE_PASSWORD"],
|
"grantTypes": ["OIDC_GRANT_TYPE_AUTHORIZATION_CODE", "OIDC_GRANT_TYPE_REFRESH_TOKEN", "OIDC_GRANT_TYPE_PASSWORD"],
|
||||||
"appType": "OIDC_APP_TYPE_WEB",
|
"appType": "OIDC_APP_TYPE_WEB",
|
||||||
"authMethodType": "OIDC_AUTH_METHOD_TYPE_POST",
|
"authMethodType": "OIDC_AUTH_METHOD_TYPE_POST",
|
||||||
"postLogoutRedirectUris": ["http://localhost:8080", "http://localhost:3000", "http://localhost:9000"],
|
"postLogoutRedirectUris": ["http://localhost:9000", "http://localhost:3000", "http://localhost:9000"],
|
||||||
"accessTokenType": "OIDC_TOKEN_TYPE_BEARER",
|
"accessTokenType": "OIDC_TOKEN_TYPE_BEARER",
|
||||||
"devMode": true,
|
"devMode": true,
|
||||||
}))
|
}))
|
||||||
|
|
@ -466,10 +466,10 @@ Database:
|
||||||
Machine:
|
Machine:
|
||||||
Identification:
|
Identification:
|
||||||
Hostname: localhost
|
Hostname: localhost
|
||||||
WebhookAddress: http://localhost:8080
|
WebhookAddress: http://localhost:9000
|
||||||
|
|
||||||
ExternalDomain: localhost:8080
|
ExternalDomain: localhost:9000
|
||||||
ExternalPort: 8080
|
ExternalPort: 9000
|
||||||
ExternalSecure: false
|
ExternalSecure: false
|
||||||
|
|
||||||
TLS:
|
TLS:
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ impl TlsIntegration {
|
||||||
services.insert(
|
services.insert(
|
||||||
"api".to_string(),
|
"api".to_string(),
|
||||||
ServiceUrls {
|
ServiceUrls {
|
||||||
original: "http://localhost:8080".to_string(),
|
original: "http://localhost:9000".to_string(),
|
||||||
secure: "https://localhost:8443".to_string(),
|
secure: "https://localhost:8443".to_string(),
|
||||||
port: 8080,
|
port: 9000,
|
||||||
tls_port: 8443,
|
tls_port: 8443,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -105,9 +105,9 @@ impl TlsIntegration {
|
||||||
services.insert(
|
services.insert(
|
||||||
"directory".to_string(),
|
"directory".to_string(),
|
||||||
ServiceUrls {
|
ServiceUrls {
|
||||||
original: "http://localhost:8080".to_string(),
|
original: "http://localhost:9000".to_string(),
|
||||||
secure: "https://localhost:8446".to_string(),
|
secure: "https://localhost:8446".to_string(),
|
||||||
port: 8080,
|
port: 9000,
|
||||||
tls_port: 8446,
|
tls_port: 8446,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue