Check the lastest version at kicoma.stanislavvalasek.com.
All source code in this repository is released under the CC BY‑NC 4.0 license.
- ❌ Commercial use is not permitted
- đź”’ No patent rights are granted
- 📝 Attribution and copyright notice must be included
⚠️ No liability and no warranty
If you'd like to use this software commercially, please contact me to discuss a commercial license.
./manage.py collectstatic --noinput
./manage.py makemessages -l en --ignore=.venv
./manage.py makemessages -l cs --ignore=.venv
./manage.py compilemessages --ignore=.venv
To get started with the app, clone the repo and then install Python 3:
cd ~/tmp
git clone https://github.com/valasek/kicoma
cd kicomaJust rebuild the dev container, app is running on port 8000
Alternativelly, install docker and docker compose and run docker-compose up
If you need to start server manually, the commnad is:
./manage.py runserver_plus 0.0.0.0:8000
Commit your changes all relevant files into repo.
export KAMAL_REGISTRY_PASSWORD=<value>
kamal deployConnect to server: ssh root@162.55.185.37
Free disk space if needed docker system prune -af --volumes
Run uv lock whenever you change pyproject.toml uv sync --extra dev # Install from lockfile
Show outdated packages uv tree --outdated --depth=1 uv lock --upgrade
uv lock uv add new-package # Adds to pyproject.toml and updates lockfile uv remove old-package # Removes from pyproject.toml and updates lockfile
uv lock --upgrade-package django
uv lock --upgrade-package django --upgrade-package gunicorn
config/django_secret.key e.g. generate it using https://djecrety.ir
config/django_admin_url.key to admin/ or more secure version config/mailgun_api.key config/mailgun_public.key config/mailgun_smtp_login.key config/mailgun_smtp_password.key
gem update kamal
kamal proxy upgrade/var/lib/docker/volumes/kicoma_storage/_data/
Check if litestream is running:
sudo journalctl -u litestream -f
docker exec -it kicoma-web-1 bash
./reset-db.sh
./manage.py shell
from django.contrib.auth.hashers import make_password
make_password('password')Using Graph models
./manage.py graph_models -a -g -o datamodel.png or
./manage.py graph_models kitchen -g -o datamodel.png and copy the file to statics/images
Running type checks with mypy:
mypy kicoma
To run the tests, check your test coverage, and generate an HTML coverage report::
coverage run -m pytest
coverage html
open htmlcov/index.htmlAdd dev dependencies into console and run tests
uv run python manage.py test --settings=config.settings.test
uv run python manage.py check --deploy --settings=config.settings.production
Get container ID:
scp ./full_dump.json root@162.55.185.37:/root/full_dump.json
ssh root@162.55.185.37
CONTAINER_ID=$(docker ps --format '{{.ID}}' --filter 'name=kicoma-web-' --filter 'ancestor=svalasek/kicoma')
docker cp /root/full_dump.json $CONTAINER_ID:/app/full_dump.json
docker exec -it $CONTAINER_ID python3 manage.py flush --noinput
docker exec -it $CONTAINER_ID python3 manage.py loaddata full_dump.jsonCheck the original repo template: Developing locally
