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

75 lines
1.8 KiB
YAML
Raw Normal View History

version: '3'
env:
BE_BASE_PATH: "/{{ .TASKFILE_DIR }}/backend"
VENV_PATH: "{{ .BE_BASE_PATH }}/.venv"
VENV_BIN: "{{ .VENV_PATH }}/bin"
VENV_ACTIVATE: "{{ .VENV_BIN }}/activate"
DOTENV: "{{ .BE_BASE_PATH }}/.env"
APP_CONTAINER_NAME: "rotini_app"
tasks:
bootstrap:
internal: true
cmds:
- . script/bootstrap
sources:
- "{{ .BE_BASE_PATH }}/pyproject.toml"
generates:
- "{{ .VENV_PATH }}/*"
dir: backend
lint:
desc: "Lints /backend using black + pylint."
deps: [bootstrap]
cmds:
- "{{ .VENV_BIN }}/black . --check"
- "{{ .VENV_BIN }}/pylint ./rotini"
dir: backend
dotenv:
- ../backend-test.env
lintfix:
desc: "Lints and fixes /backend using black + pylint."
deps: [bootstrap]
cmds:
- "{{ .VENV_BIN }}/black ."
- "{{ .VENV_BIN }}/pylint ./rotini"
dir: backend
dotenv:
- ../backend-test.env
test:
desc: "Run the test suites."
deps: [bootstrap]
cmd: . script/test
dir: backend
dotenv:
- ../backend-test.env
start:
desc: "Starts the backend application."
deps: [build]
env:
APP_CONTAINER_NAME: "{{ .APP_CONTAINER_NAME }}"
cmd: . script/start.sh
dir: backend
stop:
desc: "Stops the backend application."
cmd: docker rm -f {{ .APP_CONTAINER_NAME }}
logs:
desc: "Shortcut to Docker container logs"
cmd: docker logs {{ .APP_CONTAINER_NAME }} -f
start-db:
desc: "Provisions a local Postgres database."
dotenv:
- "{{ .DOTENV }}"
cmd: . script/provision-db
dir: backend
lock-deps:
desc: "Locks production and development dependencies"
deps: [bootstrap]
cmd: . script/requirements-lock
dir: backend
build:
desc: "Builds a docker image from /backend"
cmd: . script/build.sh
dir: backend