Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
Fancien committed Sep 26, 2023
1 parent d801e81 commit 60c0c64
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

Requirements: python3.9, [redis](https://redis.io/)

1. Install the requirements
Redis stack server can be installed by following the [official documentation](https://redis.io/docs/getting-started/install-stack/)


1. Install the python dependencies
```bash
python -m pip install -r requirements.txt
```
Expand All @@ -15,11 +18,11 @@ and modify the value of `CELERY_SECRET_KEY` inside (or set a value in your envir
```bash
redis-stack-server
```
3. Run the local server:
4. Run the local server:
```bash
uvicorn app.main:app --reload
```
4. (Optional) If you want the automated assessments to work, you need a celery worker running.
5. (Optional) If you want the automated assessments to work, you need a celery worker running.
The option `-l INFO` can be added at the end of the line to increase the log level to INFO
```bash
celery -A app.celery.celery_app worker
Expand All @@ -46,6 +49,16 @@ If you have redis-cli or RedisInsight installed, the redis endpoint can be acces

This docker container also includes an image for the celery worker.


# Common issues

- **Docker cannot access port 8000**: The port may be used by another application,
change the value of the port in the file `docker-compose.yml` and try to build the container
again.
- **A secret key is necessary for celery to interact with the application**:
You probably forgot to setup a secret key for your application. Please refer to the second step of
the relevant installation section (Local or Docker) of this README.

# Testing

First install test requirements.
Expand All @@ -56,4 +69,4 @@ pip install -r test-requirements.txt
Then, you can simply run all tests using pytest.
```shell
pytest
```
```

0 comments on commit 60c0c64

Please sign in to comment.