-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adds readme file and documentation
- Loading branch information
1 parent
1fe9126
commit 511ab9c
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## AWS Django Celery Redis using ElasticCache | ||
|
||
To run this project you need to have an AWS account and a Redis ElasticCache instance running. | ||
|
||
### Steps to run the project: | ||
|
||
1. Clone the repository | ||
2. Create a virtual environment and activate it | ||
3. Install the requirements | ||
4. Create a `.env` file with the following command: | ||
```bash | ||
cp .env.example .env | ||
``` | ||
5. Fill the `.env` file with your AWS credentials and the Redis ElasticCache endpoint | ||
6. Run the Django server with the following command: | ||
```bash | ||
python manage.py runserver | ||
``` | ||
7. Run the Celery worker with the following command: | ||
```bash | ||
celery -A aws_django_celery_redis worker --loglevel=info | ||
``` | ||
## OR | ||
Run this with docker | ||
```bash | ||
docker run -p 8000:8000 <aws_django_celery_redis_image> | ||
``` | ||
|
||
## Test Caching and broker | ||
Go to `http://localhost:8000/add/` to view your task id |