- Run makefile commands in the Docker container
export RUN_IN_DOCKER=true
make test
uv init
uv pip install
# Install npm dependencies
npm install
- Create local certs to use server over HTTPS:
mkcert -cert-file cert.pem -key-file key.pem localhost 127.0.0.1
. Put generated files intocerts
directory - Start Docker and run
docker-compose up -d
fromdocker
directory. Run local version of docker-compose:docker-compose -f docker-compose.yml -f docker-compose.local.yml up
- Start Celery worker
make worker
- Start Django app
uv run python manage.py runserver
ormake dev
. - Visit
https://localhost:8000/
Creates superuser with the following credentials
email: admin@gmail.com password: superPassword12
make create-superuser
DJANGO_ENV=local uv run python manage.py shell
from djangoblog.factory import AccountFactory
AccountFactory.create_batch(50)
API documentation is available at: /api/docs
For load testing we are using Locust
uv run locust -f locustfile.py --host=http://localhost:9020
Run with entr to reload on changes
Install: brew install entr
Run: ls locustfile.py | entr -r uv run locust -f locustfile.py --host=http://localhost:9020
docker-compose -f docker-compose.yml -f docker-compose.debug.yml up
terraform apply --parallelism=20 -auto-approve
- Create secret from file:
kubectl create secret generic google-credentials --from-file=infra/terraform/gcp-creds.json -n default
- Create secrets from
.env
file:kubectl create secret generic app --from-env-file=<(env -i sh -c "set -a; . .env; printenv | grep -v '^PWD='")
- Apply kubernetes config
kubernetes apply -f infra/k8
- Clone repo https://github.com/deviantony/docker-elk
docker compose up setup
docker compose up
- Open Kibana:
http://localhost:5601/
- Credentials:
- username:
elastic
- password:
changeme