Skip to content

Commit

Permalink
chore: update README.md about db setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Makcal committed Oct 15, 2024
1 parent 76ad316 commit 5dcab1c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,18 @@
cp example.env .env
```

6. Create postgres database
```bash
psql -c 'CREATE DATABASE rooms_api_108_test;'
```

7. Upgrade database schemas
```bash
poetry run alembic upgrade head
```
6. Create postgres database or via Docker.
```bash
docker-compose -f docker-compose-local-db.yaml up -d --build
```

### Run
## Run

```bash
poetry run fastapi dev src/main.py
```

## Via Docker
### Via Docker

Check the `DB_URL` setting in `.env` file.
```bash
Expand All @@ -51,4 +46,7 @@ docker run --rm -ti -d -p 80:80 --env-file .env innohassle-rooms-api

## Usage

Send requests with `X-Token` header (generated by `src.api.auth.utils.create_jwt({'sub': 'tgbot'})`) to verify you are the bot.
Send requests with `X-Token` header (generated by `src.api.auth.utils.create_jwt({'sub': 'tgbot'})`) to verify you
are the [bot](https://github.com/one-zero-eight/rooms-bot/).

[docker-compose-global.yaml](docker-compose-global.yaml) is used to set up all Rooms services.

0 comments on commit 5dcab1c

Please sign in to comment.