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

60 lines
1.6 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
CONTAINER_MANAGER: "podman"
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.sh {{ .CLI_ARGS }}
dotenv:
- ../backend-test.env
lock-deps:
desc: "Locks production and development dependencies"
deps: [bootstrap]
cmd: $SHELL script/requirements-lock
container:start:
desc: "Starts the backend application."
deps: [container:build]
cmd: $SHELL script/start.sh
dotenv:
- ../backend.env
container:stop:
desc: "Stops the backend application."
cmds:
- "{{ .CONTAINER_MANAGER }} rm -f {{ .APP_CONTAINER_NAME }}"
- "{{ .CONTAINER_MANAGER }} rm -f {{ .DB_CONTAINER_NAME }}"
container:logs:
desc: "Shortcut to container container logs"
cmd: "{{ .CONTAINER_MANAGER }} logs -f {{ .APP_CONTAINER_NAME }}"
container:build:
desc: "Builds a container image from /backend"
cmd: $SHELL script/build.sh