CLI commands
This page contains a list of CLI commands that you can use within the backend
package context.
pnpm nx run backend:compose-build-image
Builds a backend Docker image by running docker-compose build backend
.
This command is designed to run on CI
pnpm nx run backend:test
Runs tests (scripts/run_tests.sh
script) inside Docker container using docker-compose
.
pnpm nx run backend:build
Runs scripts/build.sh
script.
Depends on: pnpm nx run backend:test
pnpm nx run backend:deploy:api
Runs pnpm nx cdk:deploy:api
along with pnpm nx run tools:upload-service-version api "url=https://${SHIPFAST_DOMAIN_API}"
pnpm nx run backend:deploy:migrations
Runs following commands:
pnpm nx cdk:deploy:migrations
pnpm nx run trigger-migrations-job
pnpm nx run tools:upload-service-version migrations
pnpm shipfast backend test
Alias command for pnpm nx test
.
pnpm shipfast backend build
Alias command for pnpm nx build
.
pnpm shipfast backend shell
Runs bash
inside backend container: docker-compose run --rm backend bash
pnpm shipfast backend makemigrations
Runs python ./manage.py makemigrations
inside backend container.
pnpm shipfast backend migrate
Runs python ./manage.py migrate
inside backend container.
pnpm shipfast backend ruff
Runs ruff
inside backend container.
pnpm shipfast backend black
Runs black
inside backend container.
pnpm shipfast backend stripe sync
Runs python ./manage.py djstripe_sync_models
inside backend container.
pnpm shipfast backend secrets
It starts secrets-editor
with the backend
context (SERVICE_NAME=backend
): tool that helps to set up an environment
variables for AWS environment. Find more about setting environment variables for a service
here.
This command should be called only after saas aws set-env [STAGE_NAME]
command.
pnpm shipfast backend remote-shell
Executes shell script which connects to the ECS backend task and starts an interactive shell session inside it.
This command should be called only after saas aws set-env [STAGE_NAME]
command.