common: initial database handling
Can be configured from the config file, and also using environment options. ```toml [database] url = "postgresql://fc_ci:password@localhost/fc_ci" max_connections = 20 min_connections = 5 connect_timeout = 30 idle_timeout = 600 max_lifetime = 1800 ``` We'll want to support SQlite in the future, and better secret handling for database credentials. For now, this is workable. --- Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I36b4c1306511052a2748ca9d5d3429366a6a6964
This commit is contained in:
parent
a4c3cd1517
commit
0e6d249e0f
6 changed files with 530 additions and 5 deletions
|
|
@ -1,10 +1,17 @@
|
|||
//! Common types and utilities for CI
|
||||
|
||||
pub mod config;
|
||||
pub mod database;
|
||||
pub mod error;
|
||||
pub mod migrate;
|
||||
pub mod migrate_cli;
|
||||
pub mod models;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub use config::*;
|
||||
pub use database::*;
|
||||
pub use error::*;
|
||||
pub use migrate::*;
|
||||
pub use models::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue