This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
rotini/Taskfile.backend.yml

57 lines
1.4 KiB
YAML

version: '3'
env:
VENV_PATH: "{{ .TASKFILE_DIR }}/.venv"
VENV_BIN: "{{ .VENV_PATH }}/bin"
APP_CONTAINER_NAME: "rotini_app"
DB_CONTAINER_NAME: "rotini_db"
SHELL: /bin/bash
tasks:
bootstrap:
internal: true
cmd: $SHELL script/bootstrap
sources:
- ./pyproject.toml
generates:
- "{{ .VENV_PATH }}/*"
lint:
desc: "Checks /backend for linting and formatting problems."
deps: [bootstrap]
cmd: . script/format.sh
dotenv:
- ../backend-test.env
lintfix:
desc: "Resolves linting and formatting problems in /backend."
deps: [bootstrap]
cmd: $SHELL script/format.sh
env:
FIX: 1
dotenv:
- ../backend-test.env
test:
desc: "Run the test suites."
deps: [bootstrap]
cmd: $SHELL script/test
dotenv:
- ../backend-test.env
lock-deps:
desc: "Locks production and development dependencies"
deps: [bootstrap]
cmd: $SHELL script/requirements-lock
docker:start:
desc: "Starts the backend application."
deps: [docker:build]
cmd: $SHELL script/start.sh
dotenv:
- ../backend.env
docker:stop:
desc: "Stops the backend application."
cmd: docker rm -f {{ .APP_CONTAINER_NAME }} {{ .DB_CONTAINER_NAME }}
docker:logs:
desc: "Shortcut to Docker container logs"
cmd: docker logs {{ .APP_CONTAINER_NAME }} -f
docker:build:
desc: "Builds a docker image from /backend"
cmd: $SHELL script/build.sh