This is a todoAPI using Python, Django, SQLite and Docker
Running this project in a python venv and use pip to install our deps.
python -m venv venv
.\venv\Scripts\activate // for windows
source venv/bin/activate // for mac
pip install -r requirements.txt
Run Migrations
python manage.py makemigrations
python manage.py migrate
Run the server
python manage.py runserver
Create superuser
python manage.py createsuperuser
To jump out of our venv and back to our host machine.
deactivate
Use docker-compose.yml
docker-compose up --build
docker-compose down
To check the status of your Docker container
docker container ls
Run migrations
docker-compose run web python manage.py migrate
Once the container is up and running, you can access your Django application at http://localhost:8000.
Access Swagger UI
Open your browser and navigate to http://localhost:8000/swagger/ to view the Swagger UI. You should see your API endpoints documented and available for testing.
Alternatively, you can view the ReDoc documentation at http://localhost:8000/redoc/.
docker rm container_name
docker image rm image_name
docker system prune
docker images prune
Check folder size:
du -sh *