- Install Docker: https://hub.docker.com/search/?type=edition&offering=community
- Setup python environment:
- You may want to use virtualenv to create a separate python environment
pip install -r requirements.txt
- (Optional)
python3 manage.py migrate
- (Optional)
python3 manage.py createsuperuser --username admin --email [email protected]
python3 manage.py runserver
Then, you can open the URL http://127.0.0.1:8000/
docker build -t test .
docker run -d -p8000:8000 test
You can debug container docker run -d -p8000:8000 test /bin/bash
bash docker-compose up
http://localhost:8000 # Django App
http://localhost:9090 # Prometheus
http://localhost:3000 # Grafana (admin:admin)
http://localhost:8000/metrics # Prometheus metrics
http://localhost:8000/healthz # check Healthz
docker build -t test .
docker tag test sergbs/django-hello-world
docker push sergbs/django-hello-world
kubectl create -f ./kubernetes/deployment.yaml
kubectl create -f ./kubernetes/service.yaml