diff --git a/.env b/.env index ae169445c..c7f4c80fa 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ # database POSTGRES_PASSWORD=CHANGE_ME -POSTGRES_USER=navigatum -POSTGRES_DB=navigatum +POSTGRES_USER=postgres +POSTGRES_DB=postgres # feedback GITHUB_TOKEN=CHANGE_ME diff --git a/server/main-api/README.md b/server/main-api/README.md index 264c6d2ba..03a1faf26 100644 --- a/server/main-api/README.md +++ b/server/main-api/README.md @@ -37,7 +37,7 @@ MeiliSearch provides an interactive interface at . To set up the Postgres, run the following command: ```bash -docker run -it --rm -e POSTGRES_PASSWORD=password -p 5432:5432 postgres:latest +docker run -it --rm -e POSTGRES_PASSWORD=CHANGE_ME -p 5432:5432 postgres:latest ``` ### Starting the server @@ -82,8 +82,8 @@ To get compiletime guarantees for our queries, we use sqlx. To add/edit a query, you will need to run the following command: ```bash -cargo sqlx migrate run --database-url postgres://postgres:password@localhost:5432/postgres -cargo sqlx prepare --database-url postgres://postgres:password@localhost:5432/postgres --workspace +cargo sqlx migrate run --database-url postgres://postgres:CHANGE_ME@localhost:5432/postgres +cargo sqlx prepare --database-url postgres://postgres:CHANGE_ME@localhost:5432/postgres --workspace ``` ### How to Set up the tileserver (needed for the `preview` endpoint) diff --git a/server/main-api/src/main.rs b/server/main-api/src/main.rs index ae9d393fa..86a958326 100644 --- a/server/main-api/src/main.rs +++ b/server/main-api/src/main.rs @@ -71,7 +71,7 @@ async fn health_status_handler(data: web::Data) -> HttpResponse { fn connection_string() -> String { let username = std::env::var("POSTGRES_USER").unwrap_or_else(|_| "postgres".to_string()); - let password = std::env::var("POSTGRES_PASSWORD").unwrap_or_else(|_| "password".to_string()); + let password = std::env::var("POSTGRES_PASSWORD").unwrap_or_else(|_| "CHANGE_ME".to_string()); let url = std::env::var("POSTGRES_URL").unwrap_or_else(|_| "localhost".to_string()); let db = std::env::var("POSTGRES_DB").unwrap_or_else(|_| username.clone()); format!("postgres://{username}:{password}@{url}/{db}")