Skip to content

Commit

Permalink
fixed inconssitent example passwords making developing more difficult…
Browse files Browse the repository at this point in the history
… than it needs
  • Loading branch information
CommanderStorm committed Jul 10, 2024
1 parent 67a054a commit b55de62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions server/main-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MeiliSearch provides an interactive interface at <http://localhost:7700>.
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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion server/main-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async fn health_status_handler(data: web::Data<AppData>) -> 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}")
Expand Down

0 comments on commit b55de62

Please sign in to comment.