A collection of Python/Django RESTful API for generating receipts for authenticated and authorized users.
- Python 3.8
- virtualenv
- Redis
- Django 3.2.7
- Django REST Framework 3.12.2
- WeasyPrint
- Gunicorn
- Celery
- Python Decouple
- Django Environ
- boto3
- django-rest-auth
- djang-allauth
- PostgreSQL
- Docker
- docker-compose
- Heroku
- AWS S3 (Static and media assets)
Make sure you have installed the latest docker ecosystem tools (i.e. Docker Engine, Docker CLI, Docker Machine, and docker-compose). After that, follow the following steps:
- Download or clone this repository to your local machine and change your working directory to the repository directory.
$ git clone <repo-url>
$ cd <repo-directory>
- Copy the
.env.example
file to.env
file. Change the values in the file accordingly. - Run the following command:
$ docker-compose up --build -d
Wait until the container build is complete. Now your endpoints should be available on http://127.0.0.1:8000/receipts/.
Make sure you have Python 3.8, virtualenv, and Redis installed.
MacOS and Linux Steps:
- Download or clone this repository to your local machine and change your working directory to the repository directory.
$ git clone <repo-url>
$ cd <repo-directory>
- Copy the
.env.example
file to.env
file. Change the values in the file accordingly. - Create and activate a new python virtual enviroment using the following command:
$ virtualenv --python=python3.8 venv
- To install all dependencies and setup your local database, run the following commands
(venv)$ pip install -r requirements.txt
(venv)$ python manage.py migrate --no-input
(venv)$ python manage.py runserver 0.0.0.0:8000
- Start your redis server
$ sudo service redis-server start
- Start celery workers
$ celery -A config worker -l info
Now your endpoints should be available on http://127.0.0.1:8000/receipts/.