From f1c5ecc6a0dfe68c686fc7d12b7a67515b73ac65 Mon Sep 17 00:00:00 2001 From: Haydn Greatnews Date: Fri, 3 May 2024 17:56:32 +1200 Subject: [PATCH] Add Springload Justfile --- justfile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 000000000..102c8980a --- /dev/null +++ b/justfile @@ -0,0 +1,33 @@ +project := `basename $PWD` + +# Lists available recipes +default: + @just --list + +# Update constraints +update-constraints: + docker buildx bake \ + --load \ + --file docker-bake.hcl \ + --no-cache \ + --set *.tags={{project}}-constraints \ + app + docker run --rm --entrypoint='' {{project}}-constraints pip freeze > requirements/constraints.txt + docker image rm {{project}}-constraints + +# Run manage.py migrate +migrate: + docker-compose exec -T application sh -c 'python manage.py migrate' + +# Run manage.py makemigrations +makemigrations: + docker-compose exec -T application sh -c 'python manage.py makemigrations' + +# Shell (backend) +shell: + docker-compose exec application sh + +# Run unit tests +# TODO: Update for however tests are run here +# test: +# docker-compose exec -T application sh test.sh