CI/CD for Fly.io
Build and deploy a Docker image to Fly.io.
Use template →1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
env: FLY_APP_NAME: "example-project" PLATFORM: "linux/amd64" steps: - label: ":docker: docker build and push" key: "build" plugins: - dannymidnight/setup-flyctl commands: | fly auth docker docker build -t registry.fly.io/${FLY_APP_NAME}:${BUILDKITE_COMMIT} --platform ${PLATFORM} . docker push registry.fly.io/${FLY_APP_NAME}:${BUILDKITE_COMMIT} - label: ":fly-io: fly deploy" depends_on: "build" plugins: - dannymidnight/setup-flyctl command: "flyctl deploy -i registry.fly.io/${FLY_APP_NAME}:${BUILDKITE_COMMIT}"
- Use cases
- Continuous deployment, Continuous integration
- Tools
- Docker
CI/CD for Fly.io
This template gives you a continuous deployment (CD) pipeline that builds and deploys a docker image to Fly.io.
At a glance:
How it works
This template:
- Builds and pushes a Docker image to the Fly.io registry.
- Deploys image to Fly.io.
Next steps
After you select Use template, you’ll:
- Connect the Git repository with your Fly.io application.
- Configure Buildkite with the following secrets:
FLY_ACCESS_TOKEN
,FLY_APP_NAME
. - Configure the compute—run locally, on-premises, or in the cloud.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue , or reach out to support.