feat: Enable Docker deployment and CD
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 8m1s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 8m1s
Closes #8, partially addresses #6
This commit is contained in:
@@ -4,7 +4,7 @@ use std::env;
|
||||
|
||||
use poise::serenity_prelude::{ChannelId, GuildId};
|
||||
use sqlx::SqlitePool;
|
||||
use tracing::error;
|
||||
use tracing::{error, info};
|
||||
|
||||
pub type Result<T> = ::std::result::Result<T, sqlx::Error>;
|
||||
|
||||
@@ -24,14 +24,12 @@ impl Database {
|
||||
///
|
||||
/// This function will return an error if the Sqlite pool fails to
|
||||
/// create.
|
||||
// TODO: Create the database if it doesn’t exist already and run migrations
|
||||
pub async fn new() -> Result<Self> {
|
||||
Ok(Self(
|
||||
SqlitePool::connect(
|
||||
&env::var("DATABASE_URL")
|
||||
.expect("Missing enviroment variable DATABASE_URL"),
|
||||
)
|
||||
.await?,
|
||||
))
|
||||
let db_url = env::var("DATABASE_URL")
|
||||
.expect("Missing enviroment variable DATABASE_URL");
|
||||
info!("Connecting to database located at {db_url}");
|
||||
Ok(Self(SqlitePool::connect(&db_url).await?))
|
||||
}
|
||||
|
||||
/// Return from database all channels registered as loggers for a
|
||||
|
||||
Reference in New Issue
Block a user