Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from christoff-linde/63-fix-docker-compose-config
Browse files Browse the repository at this point in the history
63 fix docker compose config
  • Loading branch information
christoff-linde authored Mar 10, 2024
2 parents ed3f822 + d8acaf0 commit b128fe1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
.env
.env.override
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: "3"

networks:
default:
name: pih-rs
services:
backend:
container_name: pih-rs-api
Expand All @@ -9,8 +12,7 @@ services:
dockerfile: Dockerfile
env_file:
- ./.env
environment:
RUST_BACKTRACE: 1
- ./.env.override
ports:
- "3000:3000"
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion src/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub async fn serve(config: Config, db_pool: PgPool) -> anyhow::Result<()> {

let app = api_router(api_context);

let addr = SocketAddr::from((Ipv4Addr::LOCALHOST, 3000));
let addr = SocketAddr::from((Ipv4Addr::UNSPECIFIED, 3000));
let listener = TcpListener::bind(addr).await?;
axum::serve(listener, app)
.with_graceful_shutdown(shutdown_signal())
Expand Down
4 changes: 2 additions & 2 deletions src/http/sensors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ async fn create_sensor_reading(

match result {
Ok(_) => {
println!("ROW inserted");
tracing::debug!("Successfully inserted row: {:?}", &result);
}
Err(error) => {
println!("ERROR inserting row: {}", error);
tracing::error!("Error inserting row: {:?}", error);
}
}

Expand Down

0 comments on commit b128fe1

Please sign in to comment.