API for Catalog service.
- Users can register, login in the Catalog service using username and password.
- The API allows for manage the inventory of products.
- The API allows for manage addresses, products and orders.
- The API allows to save information in a order_events.txt about changed statuses of orders.
git clone https://github.com/InnaKushnir/order_flask
cd order_flask
python -m venv venv
venv/Scripts/activate
pip install -r requirements.txt
- Copy .env.sample -> .env and populate with all required data.
- Docker is used to run a Redis container that is used as a broker for Celery.
docker run -d -p 6379:6379 redis
The Celery library is used to schedule tasks and launch workers.
- Starting the Celery worker is done with the command.
celery -A celery_ worker -l INFO -P solo
flask run
-
Username:
admin1
-
Password:
12345admin1
-
Register on the website using the link.
http://127.0.0.1:5000/register/
- Login on the website using the link.
http://127.0.0.1:5000/login/
- Copy .env.sample -> .env and populate with all required data
docker-compose up --build