- Python 3.6.5
- Yarn
- Clone the repo.
- Use the command
git submodule update --init --recursive
to get the frontend and backend. - Inside
image-resizer-api
checkout master withgit checkout master
, the same for theimage-resizer-front
- Go to
ìmage-resizer-api
folder and change the permission ofboot.sh
file with the commandsudo chmod +x boot.sh
. - Go to
image-resizer-front
and useyarn install
command to install dependecies. - Use
pip install docker-compose
. - Use
docker-compose build
anddocker-compose up
Both containers front-end and back-end are running @http://localhost:8080
@http://localhost:8000
respectively. Check the front-end to test the application.
Basically:
- Django API, RabbitMQ for Async tasks, Vue Client.
- The resize task is handled by the OpenCV library.
- Front-end sends the payload with "file", "name", "width", "height"
- Back-end will save this file instance.
- Back-end then sends the file to the RabbitMQ and celery does the "resize_job" asynchronously.
- While this job is in progress the front-end will check every 2 seconds whether the "job_done" property is true. "job_done" can be fetched @
/api/images/{job_id}/
endpoint in the API. - If job is done the frontend will then catch the resized image url and show a download button.