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:
parent
bf7e6cf0a0
commit
4d5caffe0b
@ -200,7 +200,7 @@ securityContext:
|
|||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: false
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|||||||
@ -22,7 +22,7 @@ impl AppDatabase {
|
|||||||
let connection_timeout = cfg.database_connection_timeout()?;
|
let connection_timeout = cfg.database_connection_timeout()?;
|
||||||
let schema_search_path = cfg.database_schema_search_path()?;
|
let schema_search_path = cfg.database_schema_search_path()?;
|
||||||
let read_replica = cfg.database_read_replicas()?;
|
let read_replica = cfg.database_read_replicas()?;
|
||||||
|
println!("[System]: Start Connect Database");
|
||||||
let conn_cfg = sea_orm::ConnectOptions::new(db_url)
|
let conn_cfg = sea_orm::ConnectOptions::new(db_url)
|
||||||
.max_connections(max_connections)
|
.max_connections(max_connections)
|
||||||
.min_connections(min_connections)
|
.min_connections(min_connections)
|
||||||
@ -34,7 +34,7 @@ impl AppDatabase {
|
|||||||
.to_owned();
|
.to_owned();
|
||||||
|
|
||||||
let db_write = Database::connect(conn_cfg).await?;
|
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 db_read = if let Some(ref replica_url) = read_replica {
|
||||||
let conn_cfg = sea_orm::ConnectOptions::new(replica_url.clone())
|
let conn_cfg = sea_orm::ConnectOptions::new(replica_url.clone())
|
||||||
.max_connections(max_connections)
|
.max_connections(max_connections)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user