Skip to content

Commit

Permalink
feat(server): added postgres database to compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
szattila98 committed Jul 17, 2023
1 parent 2bf3d82 commit 034a307
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
version: '3.9'

services:
database:
container_name: database
image: postgres
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"

server:
container_name: binge-at-home-server
build:
Expand Down
12 changes: 3 additions & 9 deletions server/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ pub struct Logger {
_no_constructor: PhantomData<Logger>,
}

impl Logger {
pub fn new() -> Self {
Self {
_no_constructor: PhantomData,
}
}
}

pub fn init(config: &Configuration) -> anyhow::Result<Logger> {
let log_level =
Level::from_str(config.logging().level()).context("log level could not be parsed")?;
Expand Down Expand Up @@ -76,5 +68,7 @@ pub fn init(config: &Configuration) -> anyhow::Result<Logger> {
{
bail!("logger could not be initialized: {e}")
};
Ok(Logger::new())
Ok(Logger {
_no_constructor: PhantomData,
})
}

0 comments on commit 034a307

Please # to comment.