Skip to content

Commit

Permalink
testing docker dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
tongxuanbao committed Apr 9, 2023
1 parent adf81d6 commit 29d1032
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
image: postgres:12-alpine
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PASSWORD=mysecretpassword
networks:
- server-side
ports:
Expand All @@ -48,4 +48,4 @@ networks:

volumes:
backend-cache: {}
db-data: {}
db-data: {}
6 changes: 6 additions & 0 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ fn address() -> String {
std::env::var("ADDRESS").unwrap_or_else(|_| "127.0.0.1:8000".into())
}

#[get("/heath_check")]
pub async fn health_check() -> HttpResponse {
HttpResponse::Ok().finish()
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
env_logger::init();
Expand All @@ -38,6 +43,7 @@ async fn main() -> std::io::Result<()> {
App::new()
.app_data(web::Data::new(pg_pool.clone()))
.service(list_users)
.service(health_check)
})
.bind(&address)?
.run()
Expand Down

0 comments on commit 29d1032

Please sign in to comment.