mirror of
https://github.com/algora-io/tv.git
synced 2024-11-16 00:58:59 +02:00
update setup instructions
This commit is contained in:
parent
f513b53377
commit
b2dfe81164
@ -1,4 +1,4 @@
|
||||
DATABASE_URL="postgresql://user:pass@localhost:5432/db"
|
||||
DATABASE_URL="postgresql://algora:password@localhost:5432/tv"
|
||||
|
||||
GITHUB_CLIENT_ID=""
|
||||
GITHUB_CLIENT_SECRET=""
|
||||
|
16
README.md
16
README.md
@ -75,7 +75,7 @@ To get a local copy up and running, follow these steps.
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
4. Create your database
|
||||
4. Create the database user that will manage the database
|
||||
|
||||
```sh
|
||||
sudo -u postgres psql
|
||||
@ -83,23 +83,19 @@ To get a local copy up and running, follow these steps.
|
||||
|
||||
```sql
|
||||
CREATE USER algora WITH PASSWORD 'password';
|
||||
CREATE DATABASE tv;
|
||||
GRANT ALL PRIVILEGES ON DATABASE tv TO algora;
|
||||
ALTER USER algora WITH CREATEDB;
|
||||
\q
|
||||
```
|
||||
|
||||
5. Paste your connection string into your `.env` file
|
||||
Update the `.env` file as needed with the username and password you used.
|
||||
|
||||
```env
|
||||
DATABASE_URL="postgresql://algora:password@localhost:5432/tv"
|
||||
```
|
||||
|
||||
6. Run migrations and seed your database
|
||||
5. Set up and seed your database
|
||||
|
||||
```sh
|
||||
env $(cat .env | xargs -L 1) mix ecto.setup
|
||||
```
|
||||
|
||||
7. Start your development server
|
||||
6. Start your development server
|
||||
|
||||
```sh
|
||||
env $(cat .env | xargs -L 1) iex -S mix phx.server
|
||||
|
Loading…
Reference in New Issue
Block a user