refactor to use default localhost IPs instead of localhost
This commit is contained in:
parent
9ebeeb47f4
commit
c58fdf06b7
4 changed files with 4 additions and 4 deletions
|
@ -131,7 +131,7 @@ impl Health {
|
|||
async fn ingest_reachable(&self) -> UpDown {
|
||||
reqwest::get(
|
||||
std::env::var("WEBSOCKET_HEALTHCHECK")
|
||||
.unwrap_or("http://localhost:8999/health".to_string()),
|
||||
.unwrap_or("http://127.0.0.1:8999/healthz".to_string()),
|
||||
)
|
||||
.await
|
||||
.map(|_| UpDown::Up)
|
||||
|
|
|
@ -67,7 +67,7 @@ async fn graphiql() -> impl IntoResponse {
|
|||
#[tokio::main]
|
||||
async fn main() {
|
||||
let db_url = std::env::var("DATABASE_URL")
|
||||
.unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string());
|
||||
.unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string());
|
||||
let db = sqlx::PgPool::connect(&db_url).await.unwrap();
|
||||
|
||||
let schema = Schema::build(query::Query::default(), EmptyMutation, EmptySubscription)
|
||||
|
|
|
@ -9,7 +9,7 @@ mod migrations;
|
|||
lazy_static! {
|
||||
pub static ref PG: AsyncOnce<sqlx::PgPool> = AsyncOnce::new(async {
|
||||
let db_url = std::env::var("DATABASE_URL")
|
||||
.unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string());
|
||||
.unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string());
|
||||
sqlx::PgPool::connect(&db_url).await.unwrap()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ lazy_static! {
|
|||
static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default();
|
||||
static ref PG: AsyncOnce<sqlx::PgPool> = AsyncOnce::new(async {
|
||||
let db_url = std::env::var("DATABASE_URL")
|
||||
.unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string());
|
||||
.unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string());
|
||||
PgPoolOptions::new().connect(&db_url).await.unwrap()
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue