Links:
Flask REST APIs with Flask, Docker
- Python refresh
- First Flask API
- Docker
- Flask Smorest
- Flask SQLAlchemy
- Flask-JWT-Extended
- Flask Migration and Alembic
- Git crash course
- Deploy with Render.com
- PostgresSQL, Gunicorn in Docker
- Task Queue with rq and sending emails (Maligun and Redis)
- Create a folder
mkdir flask-udemy
and go to itcd flask-udemy
- Clone This Project
git clone https://github.com/alanStocco/udemy-teclado-rest-api-flask-and-python
- Create a Virtual Environment
python3 -m venv env
- Activate Virtual Environment
source env/bin/activate
- Install Requirements Package
pip install -r requirements.txt
- Run Docker Desktop if needed
- Build Docker
docker build -t flask-smorest-api .
- Run Docker
docker run -dp 5005:5000 -w /app -v "$(pwd):/app" flask-smorest-api
In one shell build the Docker image:
docker build -t flask-rest-api-recording-email .
docker run -p 5000:5000 flask-rest-api-recording-email sh -c "flask run --host 0.0.0.0"
In one shell, run the Redis server:
docker run -w /app flask-rest-api-recording-email sh -c "rq worker -u rediss://red-clf30ikp3ifc73emf7gg:2U6HfmgDNaipohfmvOgGYb0VmCELMITE@frankfurt-redis.render.com:6379 emails"