Skip to main content

Uploading files to your deployment

API Only : This feature is currently only available through the API.

It is possible to upload files from your S3 bucket to your deployment. Since the files are only downloaded when a deployment is created, you can modify the files in your bucket and see the changes in the next deployment you create.

Pull profiles#

Pull profiles define what files or folders should be downloaded from your S3 bucket and where to save them in your deployment.

Before creating a pull profile, ensure you have at least one Endpoint Storage configured.

You will then want to create a pull profile within this bucket with the following information:

  • The name of the pull profile: This will be used to associate the pull profile to your app versions later on, so it should be unique and descriptive.
  • The source path: The path to the file or folder in your S3 bucket. It should start with a slash, and its root is the root of your bucket.
  • The source_type: This can be either "file" or "folder" and must be set correctly for the download to succeed.
  • The destination path: The path in your deployment where the file or folder will be saved. It should start with a slash, and its root is the root of your container image.
Protected destinations : Make sure to avoid protected destinations, such as `/etc/`, as this will prevent the files from being copied to your deployment, and will make your deployment fail. Make sure a normal user can write to the destination folder.

For example, if you wanted to copy the file some-file.txt, from your bucket, to the custom-folder folder in your deployment, with both file structures as described below:

S3 Bucket file structure
s3://my-bucket/
├─ some-folder/
│ ├─ some-file.txt
├─ some-other-folder/
│ ├─ some-other-file.jpg
Container file structure
/
├─ app/
│ ├─ entrypoint.sh
│ ├─ custom-folder/

You would create your pull profile with the following information:

{
"name": "some-file-pull-profile",
"source": "/some-folder/some-file.txt",
"source_type": "file",
"destination": "/app/custom-folder/"
}

For more details, See the API documentation.

Linking a pull profile to an app version#

After creating a pull profile, you must link an app version to it, so the files are downloaded when a deployment is created. That way, you can use multiple pull profiles for a single app version and reuse pull profiles between app versions.

See the API documentation

Limitations#

The total size of the files downloaded to the deployment cannot exceed 5 MB.

If this limit is reached, you will be notified at deployment time so that you can promptly resolve the issue.