- docker
- docker compose
- Create a file called
.env
with environment variables in the root of the project. - Build with
docker compose build
. - Run with
docker compose up
. - Create migrations if necessary
alembic revision --autogenerate -m "Initial"
5In another terminal run the migrationsdocker compose exec character alembic upgrade head
. 6Run test withdocker compose exec character pytest -vv
.
- Go to
http://localhost:8000/docs
. - You can also test the endpoints with your preferred rest client. (Postman/Insomnia).
- Inside the tests directory in the dummy folder is a Postman collection with the endpoints and payload.
# SETTING
ENV=dev
SECRET_KEY=BoilerPlate2024
# POSTGRES
ENGINE=postgresql+psycopg2
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432
POSTGRES_DB=character
POSTGRES_HOST=db
PGTZ=America/Argentina/Buenos_Aires
# RABBITMQ
RABBITMQ_DEFAULT_USER="admin"
RABBITMQ_DEFAULT_PASS="admin"
EXCHANGE="characters"
ROUTING_KEY="characters"
CHARACTERS_QUEUE="characters_queue"
# GMAIL
SMTP_SERVER="smtp.gmail.com"
SMTP_PORT=587
SMTP_USERNAME="username"
SMTP_PASSWORD="password"
# STATICS FILES
TEMPLATE_DIR="utils/statics/templates"