Tiltfile Snippets
Want to contribute?
Follow this guide to find out how to submit your own snippets!
Filter by tags
-
Build a Docker image
Register an image to build with docker_build
-
Build an image with inline Dockerfile
Build an nginx image with provided static assets via an inline Dockerfile
-
Apply K8s YAML
Apply K8s YAML manifest files
-
Apply K8s Kustomize templates
Apply K8s manifests results from Kustomize
-
Apply K8s Helm templates
Apply K8s manifests results from a local Helm chart
-
Apply output from custom command
Run a custom command to generate YAML to apply to the cluster
-
Create a port-forward to a container
Set up a port-forward to a resource's default container
-
Configure a K8s resource
Associate a secret and a volume to a service
-
Create a K8s resource from existing objects
Make a new resource by grouping objects necessary for cluster setup
-
Create a K8s deployment
Deploy a redis server with the "deployment" extension
-
Create a K8s secret
Create a secret with the "secret" extension
-
Create a K8s configmap
Create a configmap with the "configmap" extension
-
Build and deploy with Docker Compose
Launch services using an existing Compose file
-
Deploy Docker Compose services with overrides
Layer overrides on top of an existing Compose file
-
Run a local Yarn command
Run Yarn every time dependencies change
-
Build and run a local go server
Set up a server that rebuilds/relaunches on changes
-
Install and run a local nodejs server
Install dependencies and start the server
-
Show the K8s API server logs
Create a resource to follow the K8s API server logs
-
Build an image for an existing K8s resource
Configure live-update and inject the image into a deployment not managed by Tilt
-
Build and deploy an app to K8s
Build and deploy without YAML using the "deployment" extension
-
Trigger a Makefile task
Execute a Makefile task on-demand with a trigger
-
Enable per-developer customizations
Conditionally load a local.tiltfile for additional functionality
-
Enforce a Kubernetes version range
Require a minimum and/or maximum version of Kubernetes for compatibility
-
Enforce a minimum Tilt version
Require a minimum version of Tilt for feature availability
-
Ensure a tool is installed locally
Check that a command exists in `PATH` or fail the Tiltfile load.
-
Create a socat tunnel
Expose a remote database server on a local port
-
Full manual control for resource
Configure a resource to only start/update when triggered via web UI (works with all resource types, e.g. k8s_resource, local_resource, and dc_resource). Suggested use case: on-demand jobs/tasks.
-
Ignore file changes for resource
Configure a resource to start automatically but only update if triggered manually via web UI (works with all resource types, e.g. k8s_resource, local_resource, and dc_resource). Suggested use case: required services for project that you are not actively making changes to.
-
Wait to launch resource until first file change
Configure a resource to not launch until the first file dependency changes after launching `tilt up` (works with all resource types, e.g. k8s_resource, local_resource, and dc_resource). Suggested use case: linters, unit tests.