- Which files are uploaded to Shuttle when I deploy?
- How do I change which files are uploaded?
- How to serve static frontend assets on Shuttle?
- What happens to files after I deploy?
- What happens to files that I write to disk?
Files uploaded to the build stage
When you runshuttle deploy
, all source files in your cargo workspace that are not ignored are packed into a zip archive and uploaded to Shuttle, where they are then extracted and built.
The archive POST request (after compression) has a size limit of 100 MB.
To access files at runtime, they need to be copied from the build stage. Read more below.
Ignore files
Ignoring files can be done by adding rules to.gitignore
or .ignore
files, depending on if you want to exclude them from version control or not.
Include ignored files
If you have ignored files that you want to include in the upload to the build stage, declare those files in theShuttle.toml
file in the root of your workspace:
Shuttle.toml
Specifying only a folder name, like
"static"
, does not work. Use "static/*"
instead to include its contents.Debug included files
You can double check which files are included in your archive by turning on detailed logging:Block dirty deployments
If you want thedeploy
command to exit if there are uncommitted git changes:
Shuttle.toml
Add files to the runtime image
To make your files available at runtime such as config files, static web files etc, they need to be copied into the runtime image at the end of the build stage. To do this, declare them as build assets in the[build]
configuration in Shuttle.toml
.
Shuttle.toml