fix(deploy): disable readOnlyRootFilesystem to prevent temp file write errors

Email worker and other pods fail with "Read-only file system" when
readOnlyRootFilesystem is true, since they need to write temp files.
Also adds debug print statements for database connection lifecycle.
This commit is contained in:
ZhenYi 2026-05-11 01:14:06 +08:00
parent bf7e6cf0a0
commit 4d5caffe0b
2 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
readOnlyRootFilesystem: false
nodeSelector: {}
tolerations: []

View File

@ -22,7 +22,7 @@ impl AppDatabase {
let connection_timeout = cfg.database_connection_timeout()?;
let schema_search_path = cfg.database_schema_search_path()?;
let read_replica = cfg.database_read_replicas()?;
println!("[System]: Start Connect Database");
let conn_cfg = sea_orm::ConnectOptions::new(db_url)
.max_connections(max_connections)
.min_connections(min_connections)
@ -34,7 +34,7 @@ impl AppDatabase {
.to_owned();
let db_write = Database::connect(conn_cfg).await?;
println!("[System]: Start Read Database");
let db_read = if let Some(ref replica_url) = read_replica {
let conn_cfg = sea_orm::ConnectOptions::new(replica_url.clone())
.max_connections(max_connections)