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

[s3sync] Add SYNCEXTRA environment variable #87

Merged
merged 2 commits into from
Aug 16, 2019
Merged

[s3sync] Add SYNCEXTRA environment variable #87

merged 2 commits into from
Aug 16, 2019

Conversation

sven-codeculture
Copy link
Contributor

Make it possible to add extra parameters to the sync_cmd (such as --cache-control, for creating cache headers for all uploaded files)

This would be really helpful since i sync an CDN using this project

Make it possible to add extra parameters to the sync_cmd (such as --cache-control, for creating cache headers for all uploaded files)
Copy link
Owner

@vladgh vladgh left a comment

Choose a reason for hiding this comment

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

This would be a nice addition, thanks. But before I merge it would you please address the comments I made.

s3sync/entrypoint.sh Outdated Show resolved Hide resolved
s3sync/entrypoint.sh Outdated Show resolved Hide resolved
@vladgh vladgh self-assigned this Aug 16, 2019
Copy link
Owner

@vladgh vladgh left a comment

Choose a reason for hiding this comment

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

Thanks.

@vladgh vladgh merged commit e0d3323 into vladgh:master Aug 16, 2019
@sven-codeculture sven-codeculture deleted the patch-1 branch August 16, 2019 13:43
@vladgh
Copy link
Owner

vladgh commented Aug 16, 2019

Let me know how it works in production.

@sven-codeculture
Copy link
Contributor Author

sven-codeculture commented Aug 16, 2019

I am already using it in Production. I've currently replaced the file in an own docker image based on yours.
By adding SYNCEXTRA: --cache-control max-age=2419200,public to my docker-compose for the sync command, every newly uploaded file gets the header "cache-control: max-age=2419200,public" which i require for pagespeed on the CDN.
Unfortunatly it only works for newly uploaded files, already existing files needs to be modifyed manually.
Its also possible to add other metadata for newly uploaded files using this, according to the sync documentation.

@vladgh vladgh changed the title Add SYNCEXTRA environment variable [s3sync] Add SYNCEXTRA environment variable Aug 18, 2019
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