Move Directory (Zitadel) to port 8300
- Directory/Zitadel: 8080 -> 8300 - BotServer API remains on 8080 - Updated all references in bootstrap, installer, oauth, config
This commit is contained in:
parent
c986539fad
commit
777a3eae63
8 changed files with 20 additions and 32 deletions
|
|
@ -90,7 +90,7 @@ impl BootstrapManager {
|
|||
5432, // PostgreSQL
|
||||
9000, // MinIO
|
||||
6379, // Redis
|
||||
8080, // Zitadel / Main API
|
||||
8300, // Zitadel / Main API
|
||||
8081, // LLM server
|
||||
8082, // Embedding server
|
||||
25, // Email SMTP
|
||||
|
|
@ -999,7 +999,7 @@ Machine:
|
|||
|
||||
ExternalSecure: false
|
||||
ExternalDomain: localhost
|
||||
ExternalPort: 8080
|
||||
ExternalPort: 8300
|
||||
|
||||
DefaultInstance:
|
||||
OIDCSettings:
|
||||
|
|
@ -1214,7 +1214,7 @@ meet IN A 127.0.0.1
|
|||
while attempts < max_attempts {
|
||||
// Check if Zitadel is healthy
|
||||
let health_check = std::process::Command::new("curl")
|
||||
.args(["-f", "-s", "http://localhost:8080/healthz"])
|
||||
.args(["-f", "-s", "http://localhost:8300/healthz"])
|
||||
.output();
|
||||
|
||||
if let Ok(output) = health_check {
|
||||
|
|
@ -1248,7 +1248,7 @@ meet IN A 127.0.0.1
|
|||
};
|
||||
|
||||
let mut setup = DirectorySetup::new(
|
||||
"http://localhost:8080".to_string(), // Use HTTP since TLS is disabled
|
||||
"http://localhost:8300".to_string(), // Use HTTP since TLS is disabled
|
||||
config_path,
|
||||
);
|
||||
|
||||
|
|
@ -1627,7 +1627,7 @@ VAULT_CACHE_TTL=300
|
|||
let _ = std::process::Command::new("sh")
|
||||
.arg("-c")
|
||||
.arg(format!(
|
||||
"unset VAULT_CLIENT_CERT VAULT_CLIENT_KEY VAULT_CACERT; VAULT_ADDR={} VAULT_TOKEN={} ./botserver-stack/bin/vault/vault kv put secret/gbo/directory url=https://localhost:8080 project_id= client_id= client_secret=",
|
||||
"unset VAULT_CLIENT_CERT VAULT_CLIENT_KEY VAULT_CACERT; VAULT_ADDR={} VAULT_TOKEN={} ./botserver-stack/bin/vault/vault kv put secret/gbo/directory url=https://localhost:8300 project_id= client_id= client_secret=",
|
||||
vault_addr, root_token
|
||||
))
|
||||
.output()?;
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ impl AppConfig {
|
|||
drive: minio,
|
||||
email,
|
||||
server: ServerConfig {
|
||||
host: "127.0.0.1".to_string(),
|
||||
host: "0.0.0.0".to_string(),
|
||||
port: 8080,
|
||||
base_url: "http://localhost:8080".to_string(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ pub async fn provision_user_handler(
|
|||
.config
|
||||
.as_ref()
|
||||
.map(|c| c.server.base_url.clone())
|
||||
.unwrap_or_else(|| "http://localhost:8080".to_string());
|
||||
.unwrap_or_else(|| "http://localhost:8300".to_string());
|
||||
|
||||
let provisioning = UserProvisioningService::new(state.conn.clone(), s3_client, base_url);
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ pub async fn deprovision_user_handler(
|
|||
.config
|
||||
.as_ref()
|
||||
.map(|c| c.server.base_url.clone())
|
||||
.unwrap_or_else(|| "http://localhost:8080".to_string());
|
||||
.unwrap_or_else(|| "http://localhost:8300".to_string());
|
||||
|
||||
let provisioning = UserProvisioningService::new(state.conn.clone(), s3_client, base_url);
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ pub async fn check_services_status(State(state): State<Arc<AppState>>) -> impl I
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
if let Ok(response) = client.get("https://localhost:8080/healthz").send().await {
|
||||
if let Ok(response) = client.get("https://localhost:8300/healthz").send().await {
|
||||
status.directory = response.status().is_success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub struct DirectoryConfig {
|
|||
impl Default for DirectoryConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
url: "https://localhost:8080".to_string(),
|
||||
url: "https://localhost:8300".to_string(),
|
||||
admin_token: String::new(),
|
||||
project_id: "default".to_string(),
|
||||
oauth_enabled: true,
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ mod tests {
|
|||
OAuthProvider::Google,
|
||||
"test_client_id".to_string(),
|
||||
"test_secret".to_string(),
|
||||
"http://localhost:8080/callback".to_string(),
|
||||
"http://localhost:8300/callback".to_string(),
|
||||
);
|
||||
|
||||
let url = OAuthProvider::Google.build_auth_url(&config, "test_state");
|
||||
|
|
@ -389,7 +389,7 @@ mod tests {
|
|||
"my_secret".to_string(),
|
||||
);
|
||||
|
||||
let config = load_oauth_config(OAuthProvider::Google, &bot_config, "http://localhost:8080");
|
||||
let config = load_oauth_config(OAuthProvider::Google, &bot_config, "http://localhost:8300");
|
||||
|
||||
assert!(config.is_some());
|
||||
let config = config.unwrap();
|
||||
|
|
@ -410,7 +410,7 @@ mod tests {
|
|||
"my_secret".to_string(),
|
||||
);
|
||||
|
||||
let config = load_oauth_config(OAuthProvider::Google, &bot_config, "http://localhost:8080");
|
||||
let config = load_oauth_config(OAuthProvider::Google, &bot_config, "http://localhost:8300");
|
||||
|
||||
assert!(config.is_none());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ async fn get_bot_config(state: &AppState) -> HashMap<String, String> {
|
|||
fn get_base_url(state: &AppState) -> String {
|
||||
// Could read from config, for now use default
|
||||
let _ = state;
|
||||
"http://localhost:8080".to_string()
|
||||
"http://localhost:8300".to_string()
|
||||
}
|
||||
|
||||
/// Create or get existing OAuth user
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ impl PackageManager {
|
|||
"directory".to_string(),
|
||||
ComponentConfig {
|
||||
name: "directory".to_string(),
|
||||
ports: vec![8080],
|
||||
ports: vec![8300],
|
||||
dependencies: vec!["tables".to_string()],
|
||||
linux_packages: vec![],
|
||||
macos_packages: vec![],
|
||||
|
|
@ -484,7 +484,7 @@ impl PackageManager {
|
|||
// This properly creates the first instance with PAT
|
||||
"ZITADEL_MASTERKEY=MasterkeyNeedsToHave32Characters nohup {{BIN_PATH}}/zitadel start-from-init --config {{CONF_PATH}}/directory/zitadel.yaml --masterkeyFromEnv --tlsMode disabled --steps {{CONF_PATH}}/directory/steps.yaml > {{LOGS_PATH}}/zitadel.log 2>&1 &".to_string(),
|
||||
// Wait for Zitadel to be fully ready (up to 90 seconds for first instance setup)
|
||||
"for i in $(seq 1 90); do curl -sf http://localhost:8080/debug/ready && break || sleep 1; done".to_string(),
|
||||
"for i in $(seq 1 90); do curl -sf http://localhost:8300/debug/ready && break || sleep 1; done".to_string(),
|
||||
],
|
||||
pre_install_cmds_macos: vec![
|
||||
"mkdir -p {{CONF_PATH}}/directory".to_string(),
|
||||
|
|
@ -495,13 +495,13 @@ impl PackageManager {
|
|||
env_vars: HashMap::from([
|
||||
("ZITADEL_EXTERNALSECURE".to_string(), "false".to_string()),
|
||||
("ZITADEL_EXTERNALDOMAIN".to_string(), "localhost".to_string()),
|
||||
("ZITADEL_EXTERNALPORT".to_string(), "8080".to_string()),
|
||||
("ZITADEL_EXTERNALPORT".to_string(), "8300".to_string().to_string()),
|
||||
("ZITADEL_TLS_ENABLED".to_string(), "false".to_string()),
|
||||
("ZITADEL_MASTERKEY".to_string(), "MasterkeyNeedsToHave32Characters".to_string()),
|
||||
]),
|
||||
data_download_list: Vec::new(),
|
||||
exec_cmd: "nohup {{BIN_PATH}}/zitadel start --config {{CONF_PATH}}/directory/zitadel.yaml --masterkeyFromEnv --tlsMode disabled > {{LOGS_PATH}}/zitadel.log 2>&1 &".to_string(),
|
||||
check_cmd: "curl -f http://localhost:8080/healthz >/dev/null 2>&1".to_string(),
|
||||
check_cmd: "curl -f http://localhost:8300/healthz >/dev/null 2>&1".to_string(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
@ -613,7 +613,7 @@ impl PackageManager {
|
|||
ComponentConfig {
|
||||
name: "webmail".to_string(),
|
||||
|
||||
ports: vec![8080],
|
||||
ports: vec![8300],
|
||||
dependencies: vec!["email".to_string()],
|
||||
linux_packages: vec![
|
||||
"ca-certificates".to_string(),
|
||||
|
|
@ -636,7 +636,7 @@ impl PackageManager {
|
|||
env_vars: HashMap::new(),
|
||||
data_download_list: Vec::new(),
|
||||
exec_cmd: "php -S 0.0.0.0:8080 -t {{DATA_PATH}}/roundcubemail".to_string(),
|
||||
check_cmd: "curl -f -k https://localhost:8080 >/dev/null 2>&1".to_string(),
|
||||
check_cmd: "curl -f -k https://localhost:8300 >/dev/null 2>&1".to_string(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,8 +202,6 @@ pub fn configure() -> Router<Arc<AppState>> {
|
|||
Router::new()
|
||||
// Basic file operations
|
||||
.route("/files/list", get(list_files))
|
||||
// UI-compatible endpoint
|
||||
.route("/api/drive/list", get(list_drive_files_ui))
|
||||
.route("/files/read", post(read_file))
|
||||
.route("/files/write", post(write_file))
|
||||
.route("/files/save", post(write_file))
|
||||
|
|
@ -1159,13 +1157,3 @@ pub async fn restore_version(
|
|||
new_version_id,
|
||||
}))
|
||||
}
|
||||
|
||||
// ===== UI-Compatible Endpoints =====
|
||||
|
||||
/// GET /api/drive/list - List files for UI display
|
||||
pub async fn list_drive_files_ui(State(_state): State<Arc<AppState>>) -> Json<serde_json::Value> {
|
||||
Json(serde_json::json!({
|
||||
"files": [],
|
||||
"message": "No files available"
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue