fly deploy
Deploy Fly applications
Usage
fly deploy [WORKING_DIRECTORY] [flags]
Options
-a, --app Application name
--auto-confirm Accept all confirmations
--build-arg Set of build time variables in the form of NAME=VALUE pairs. Can be specified multiple times.
--build-only Build but do not deploy
--build-secret Set of build secrets of NAME=VALUE pairs. Can be specified multiple times. See https://docs.docker.com/engine/reference/commandline/buildx_build/#secret
--build-target Set the target build stage to build if the Dockerfile has more than one stage
--buildpacks-docker-host Address to docker daemon that will be exposed to the build container.
If not set (or set to empty string) the standard socket location will be used.
Special value 'inherit' may be used in which case DOCKER_HOST environment variable will be used.
This option may set DOCKER_HOST environment variable for the build container if needed.
--buildpacks-volume Mount host volume into the build container, in the form '<host path>:<target path>[:<options>]'.
- 'host path': Name of the volume or absolute directory path to mount.
- 'target path': The path where the file or directory is available in the container.
- 'options' (default "ro"): An optional comma separated list of mount options.
- "ro", volume contents are read-only.
- "rw", volume contents are readable and writeable.
- "volume-opt=<key>=<value>", can be specified more than once, takes a key-value pair consisting of the option name and its value.
Repeat for each volume in order (comma-separated lists not accepted)
-c, --config Path to application configuration file
--cpus Number of CPUs
--detach Return immediately instead of monitoring deployment progress
--dns-checks Perform DNS checks during deployment
--dockerfile Path to a Dockerfile. Defaults to the Dockerfile in the working directory.
-e, --env Set of environment variables in the form of NAME=VALUE pairs. Can be specified multiple times.
--exclude-machines Deploy to all machines except machines with these IDs. Multiple IDs can be specified with comma separated values or by providing the flag multiple times.
--exclude-regions Deploy to all machines except machines in these regions. Multiple regions can be specified with comma separated values or by providing the flag multiple times.
--file-literal Set of literals in the form of /path/inside/machine=VALUE pairs where VALUE is the content. Can be specified multiple times.
--file-local Set of files in the form of /path/inside/machine=<local/path> pairs. Can be specified multiple times.
--file-secret Set of secrets in the form of /path/inside/machine=SECRET pairs where SECRET is the name of the secret. Can be specified multiple times.
--force-machines Use the Apps v2 platform built with Machines
--ha Create spare machines that increases app availability
--host-dedication-id The dedication id of the reserved hosts for your organization (if any)
--http-failover Determines whether to failover to plain internet(https) communication with remote builders if wireguard fails
--https-failover Determines whether to failover to plain internet(https) communication with remote builders if wireguard fails
--ignorefile Path to a Docker ignore file. Defaults to the .dockerignore file in the working directory.
-i, --image The Docker image to deploy
--image-label Image label to use when tagging and pushing to the fly registry. Defaults to "deployment-{timestamp}".
--immediate-max-concurrent Maximum number of machines to update concurrently when using the immediate deployment strategy.
--label Add custom metadata to an image via docker labels
--lease-timeout Time duration to lease individual machines while running deployment. All machines are leased at the beginning and released at the end.The lease is refreshed periodically for this same time, which is why it is short.flyctl releases leases in most cases.
--local-only Perform builds locally using the local docker daemon. The default is --remote-only.
--max-concurrent Maximum number of machines to operate on concurrently.
--max-unavailable Max number of unavailable machines during rolling updates. A number between 0 and 1 means percent of total machines
--memory Memory (in megabytes) to attribute to the VM
--nixpacks Deploy using nixpacks to build the image
--no-cache Do not use the build cache when building the image
--no-public-ips Do not allocate any new public IP addresses
--now Deploy now without confirmation
--only-machines Deploy to machines only with these IDs. Multiple IDs can be specified with comma separated values or by providing the flag multiple times.
--only-regions Deploy to machines only in these regions. Multiple regions can be specified with comma separated values or by providing the flag multiple times.
--process-groups Deploy to machines only in these process groups
--push Push image to registry after build is complete
--regions Deploy to machines only in these regions. Multiple regions can be specified with comma separated values or by providing the flag multiple times.
--release-command-timeout Time duration to wait for a release command finish running, or 'none' to disable.
--remote-only Perform builds on a remote builder instance instead of using the local docker daemon. This is the default. Use --local-only to build locally.
-s, --signal Signal to stop the machine with for bluegreen strategy (default: SIGINT)
--skip-release-command Do not run the release command during deployment.
--smoke-checks Perform smoke checks during deployment
--strategy The strategy for replacing running instances. Options are canary, rolling, bluegreen, or immediate. The default strategy is rolling.
--update-only Do not create Machines for new process groups
--vm-cpu-kind The kind of CPU to use ('shared' or 'performance')
--vm-cpukind The kind of CPU to use ('shared' or 'performance')
--vm-cpus Number of CPUs
--vm-gpu-kind If set, the GPU model to attach (a100-pcie-40gb, a100-sxm4-80gb, l40s, a10)
--vm-gpukind If set, the GPU model to attach (a100-pcie-40gb, a100-sxm4-80gb, l40s, a10)
--vm-gpus Number of GPUs. Must also choose the GPU model with --vm-gpu-kind flag
--vm-memory Memory (in megabytes) to attribute to the VM
--vm-size The VM size to set machines to. See "fly platform vm-sizes" for valid values
--volume-initial-size The initial size in GB for volumes created on first deploy
--wait-timeout Time duration to wait for individual machines to transition states and become healthy.
--wg Determines whether communication with remote builders are conducted over wireguard or plain internet(https)
-y, --yes Accept all confirmations
Global Options
-t, --access-token string Fly API Access Token
--debug Print additional logs and traces
--verbose Verbose output