Add details to postgres setup

This commit is contained in:
Nat 2024-03-10 11:55:03 -07:00
parent 96939b7aee
commit 92900176a6
Signed by: nat
GPG Key ID: B53AB05285D710D6
1 changed files with 23 additions and 1 deletions

View File

@ -6,7 +6,29 @@ This project was created in under a day in 2022 as a part of an assessment. It's
To run the server, you'll need:
* Elixir, which depends on Erlang. Detailed instructions on how to install Elixir and Erlang can be found on [the Elixir website](https://elixir-lang.org/install.html). In most cases, installing Elixir will get you a copy of Erlang as well.
* Node.js. If you've been blessed to have never needed to download Node on your device, you can end that streak now by visiting [the Node.js download page](https://nodejs.org/en/download)
* PostgreSQL, which you'll need running. You can find information on how to install it on [the PostgreSQL download page](https://www.postgresql.org/download/) as well. This project is set up to assume that the database username is "postgres" and the password is "postgres"
* PostgreSQL, which you'll need running. You can find information on how to install it on [the PostgreSQL download page](https://www.postgresql.org/download/) as well.
## Aside: Setting up Postgres
By default this project assumes your PostgreSQL install has a user with the name "postgres" whose password is "postgres". Is that not the case? Either:
* Change the configuration to use the right credentials. Open `./config/dev.exs` and find and edit:
```elixir
config :bookmarker, Bookmarker.Repo,
username: "<YOUR USERNAME>",
password: "<YOUR PASSWORD>",
```
* Change your password, say, to "postgres". If you're on Linux, this would look something like:
```bash
# Run the postgresql console as the postgres user
$ sudo -u postgres psql
# reset the password
postgres=# \password <username>
Enter new password for user "<username>":
Enter it again:
postgres=# \q
```
### Finally, set up and run the server
```bash
$ cd bookmarker