# Repo management tasks mod repo ".devfiles/justfile" set dotenv-load := true bin_name := "compendium" release_mode := "dev" container_registry := "git.alecodes.page/alecodes" container_image_name := container_registry / bin_name [private] docker-compose +ARGS: docker compose --file .devfiles/docker/docker-compose.dev.yaml --env-file .env --project-name compendium {{ARGS}} start-dev-services: (docker-compose "up --remove-orphans") kitty-dev: kitten @ goto-layout tall kitten @ launch --cwd=current --dont-take-focus just build-frontend-watch kitten @ launch --cwd=current --dont-take-focus just start-dev-services kitten @ launch --cwd=current --dont-take-focus just dev nvim ./src/main.rs migrate: (docker-compose "run dbmate migrate") rollback: (docker-compose "run dbmate rollback") build-frontend-watch: watchexec --restart --watch frontend just build-frontend build-frontend: bun ./.devfiles/scripts/build-frontend.ts build: podman build --tag {{ container_image_name }}:latest --cache-to {{ container_image_name }}-cache --cache-from {{ container_image_name }}-cache . dev: watchexec --no-vcs-ignore --clear --restart --watch=dist --watch=src cargo run {{ if release_mode == "prod" { "--release" } else { "" } }} test: cargo test publish: (build) podman push {{ container_image_name }}:latest podman push {{ container_image_name }}:latest {{ container_image_name }}:$(git rev-parse --short HEAD) deploy: clean: podman system prune --build cargo clean