A phidata template creates a Workspace, which is just an umbrella term for your codebase.

Create new workspace

Run phi ws create to create a new workspace using a phidata template

phi ws create

phi will ask for a workspace template and name if not provided.

Setup existing workspace

Run phi ws setup to setup an existing directory as a phidata workspace

phi ws setup

Start workspace

Run phi ws up to create workspace resources

phi ws up

Stop workspace

Run phi ws down to delete workspace resources

phi ws down

Patch workspace

Run phi ws patch to update workspace resources

phi ws patch

The patch command in under development for some resources. Use restart if needed

Restart workspace

Run phi ws restart to stop resources and start them again

phi ws restart

Command Options

Run phi ws up --help to view all options

Environment (--env)

Use the --env or -e flag to filter the environment (dev/prd)

phi ws up --env dev

Infra (--infra)

Use the --infra or -i flag to filter the infra (docker/aws/k8s)

phi ws up --infra docker

Group (--group)

Use the --group or -g flag to filter by resource group.

phi ws up --group app

Name (--name)

Use the --name or -n flag to filter by resource name

phi ws up --name app

Type (--type)

Use the --type or -t flag to filter by resource type.

phi ws up --type container

Dry Run (--dry-run)

The --dry-run or -dr flag can be used to dry-run the command. phi ws up -dr will only print resources, not create them.

phi ws up --dry-run

Show Debug logs (--debug)

Use the --debug or -d flag to show debug logs.

phi ws up -d

Force recreate images & containers (-f)

Use the --force or -f flag to force recreate images & containers

phi ws up -f