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

add deploy job step to push static files to s3 #2476

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

tzjames
Copy link
Collaborator

@tzjames tzjames commented May 3, 2024

Features and Changes

On each deploy some frontends that were loaded from an old server might try and read the files from a new server and vice-versa. This PR will send the files to a new s3 bucket. All the files that next makes have a hash appended to the file name so they can live in the same directory. Both old and new files should be available at deploy time then.

We will then update the load balancer to send requests to /_next/static to instead be re-routed either to our cdn or directly to s3.

Test Plan

Ran the commands locally.
Saw the files get to S3: https://us-east-1.console.aws.amazon.com/s3/buckets/growthbook-cloud-static-files?region=us-east-1&bucketType=general&tab=objects

@tzjames tzjames requested a review from jdorn May 3, 2024 15:27
@tzjames tzjames merged commit 0a526a1 into main May 3, 2024
2 checks passed
@tzjames tzjames deleted the ji/static-to-s3 branch May 3, 2024 15:48
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.

None yet

2 participants