A really simple CRUD GraphQL API based on Docker and Python.
Note: In develop mode and running locally the docs are available at this url
Note: Before running any of these commands be sure that your CWD is users_crud_api_python directory.
find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
poetry install
poetry env use 3.11
poetry export --without-hashes --format=requirements.txt > requirements.app.txt
poetry export --without-hashes --only dev --format=requirements.txt > requirements.dev.txt
Note: Before running this command you need to install the dev dependencies.
poetry update
Note: Before running this command you need to install the dev dependencies.
poetry show
poetry show -l
Note: Before running this command you need to install the dev dependencies.
black ./src --line-length=150
Note: Before running this command you need to install the dev dependencies.
flake8 ./src --max-line-length=150
Note: Before running this command you need to install the dev dependencies.
mypy --explicit-package-bases ./src
ENVIRONMENT_MODE=development python src/main.py
ENVIRONMENT_MODE=testing python src/main.py
ENVIRONMENT_MODE=production python src/main.py
Note: Before running any of these commands be sure that your CWD is users_crud_api_python directory.
docker build --no-cache --tag ghcr.io/joseesco24/users_crud_api_python:latest .
docker build --tag ghcr.io/joseesco24/users_crud_api_python:latest .
docker run --rm --name users_crud_api_python_app --publish 10048:10048 --env-file ./.env --env ENVIRONMENT_MODE=production ghcr.io/joseesco24/users_crud_api_python:latest
docker run --detach --rm --name users_crud_api_python_app --publish 10048:10048 --env-file ./.env --env ENVIRONMENT_MODE=production ghcr.io/joseesco24/users_crud_api_python:latest
docker exec -it users_crud_api_python_app /bin/bash
docker kill users_crud_api_python_app
docker login -u joseesco24 -p < authentication token > ghcr.io
docker push ghcr.io/joseesco24/users_crud_api_python:latest
docker pull ghcr.io/joseesco24/users_crud_api_python:latest
Note: Before running any of these commands be sure that your CWD is users_crud_api_python directory.
docker-compose -f compose.build.yaml build
docker-compose -f compose.databases.yaml up
docker-compose -f compose.databases.yaml down
docker-compose -f compose.project.yaml up
docker-compose -f compose.project.yaml down