refactor(taskfiles): remove redundant paths and venv entries in backend taskfile
This commit is contained in:
parent
c681c65c68
commit
b5b8213be3
2 changed files with 11 additions and 20 deletions
|
@ -1,35 +1,29 @@
|
|||
version: '3'
|
||||
|
||||
env:
|
||||
BE_BASE_PATH: "/{{ .TASKFILE_DIR }}/backend"
|
||||
VENV_PATH: "{{ .BE_BASE_PATH }}/.venv"
|
||||
VENV_PATH: "{{ .TASKFILE_DIR }}/.venv"
|
||||
VENV_BIN: "{{ .VENV_PATH }}/bin"
|
||||
VENV_ACTIVATE: "{{ .VENV_BIN }}/activate"
|
||||
DOTENV: "{{ .BE_BASE_PATH }}/.env"
|
||||
APP_CONTAINER_NAME: "rotini_app"
|
||||
DB_CONTAINER_NAME: "rotini_db"
|
||||
|
||||
tasks:
|
||||
bootstrap:
|
||||
internal: true
|
||||
cmds:
|
||||
- . script/bootstrap
|
||||
cmd: . script/bootstrap
|
||||
sources:
|
||||
- "{{ .BE_BASE_PATH }}/pyproject.toml"
|
||||
- ./pyproject.toml
|
||||
generates:
|
||||
- "{{ .VENV_PATH }}/*"
|
||||
dir: backend
|
||||
lint:
|
||||
desc: "Checks /backend for linting and formatting problems."
|
||||
deps: [bootstrap]
|
||||
cmd: . script/format.sh
|
||||
dir: backend
|
||||
dotenv:
|
||||
- ../backend-test.env
|
||||
lintfix:
|
||||
desc: "Resolves linting and formatting problems in /backend."
|
||||
deps: [bootstrap]
|
||||
cmd: . script/format.sh
|
||||
dir: backend
|
||||
env:
|
||||
FIX: 1
|
||||
dotenv:
|
||||
|
@ -38,35 +32,30 @@ tasks:
|
|||
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
|
||||
dotenv:
|
||||
- ../backend.env
|
||||
stop:
|
||||
desc: "Stops the backend application."
|
||||
cmd: docker rm -f {{ .APP_CONTAINER_NAME }}
|
||||
cmd: docker rm -f {{ .APP_CONTAINER_NAME }} {{ .DB_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 }}"
|
||||
- ../backend.env
|
||||
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
|
||||
|
||||
|
|
|
@ -3,5 +3,7 @@ version: '3'
|
|||
# See environment-specific taskfiles for commands about
|
||||
# that environment.
|
||||
includes:
|
||||
be: ./Taskfile.backend.yml
|
||||
be:
|
||||
taskfile: ./Taskfile.backend.yml
|
||||
dir: backend
|
||||
fe: ./Taskfile.frontend.yml
|
||||
|
|
Reference in a new issue