Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy: host statics from tigris buckets #3864

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

alichay
Copy link
Contributor

@alichay alichay commented Aug 16, 2024

Change Summary

What and Why: This makes fly deploy support deploying static files to tigris buckets instead of using a web server integrated in the machine's init process. This makes everything a little more efficient, allows serving static files when machines are stopped, and paves the way for further improvements to statics. :)

How: When deploying, if the app has static files defined, it will use (or create) a tigris bucket named after the app. Files are uploaded to this bucket, and a couple versions of file history are kept.

Related to: superfly/tokenizer#23
Depends on: superfly/fly-go#97


Documentation

  • Fresh Produce - (soon)
  • In superfly/docs, or asked for help from docs team - (soon)
  • n/a

Copy link
Member

@btoews btoews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far. I only read the tokenizer-related parts.

internal/command/deploy/machines_tigrisstatics.go Outdated Show resolved Hide resolved
internal/command/deploy/machines_tigrisstatics.go Outdated Show resolved Hide resolved
internal/command/deploy/machines_tigrisstatics.go Outdated Show resolved Hide resolved
internal/command/deploy/machines_tigrisstatics.go Outdated Show resolved Hide resolved
@alichay alichay force-pushed the feat/statics-to-tigris-bucket branch from d5f4cdd to d5a7c5e Compare August 27, 2024 01:01
Untested.
Does not configure service to host statics from tigris.
A lot of this will get reworked when virtual services land, this is a quick hack to get it demoable
This prevents leftover static files from a failed or aborted deploy, and cleans up statics *newer* than the current deploy (for the case that the user reuses an app name and the bucket wasn't deleted previously)
This is a partial commit of a larger change, so I haven't been able to test this yet :)
This is bucket names are ensured to be unique, but ext names are not. We need to use the BUCKET_NAME env var.
@alichay alichay force-pushed the feat/statics-to-tigris-bucket branch from cd31335 to 2567cf9 Compare September 18, 2024 16:56
@alichay alichay marked this pull request as ready for review September 18, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants