From 60c0c64ac61f421455c248a9700a9a9d476b57cd Mon Sep 17 00:00:00 2001 From: "francois.ancien" Date: Tue, 26 Sep 2023 15:03:55 +0200 Subject: [PATCH] Updating README --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 565e1be..40acbce 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 @@ -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. @@ -56,4 +69,4 @@ pip install -r test-requirements.txt Then, you can simply run all tests using pytest. ```shell pytest -``` \ No newline at end of file +```