Skip to content

Instantly share code, notes, and snippets.

@jjtroberts
Created October 12, 2022 22:01
Show Gist options
  • Save jjtroberts/ae444285eeb2d4f0d8d8249cd5c4d2df to your computer and use it in GitHub Desktop.
Save jjtroberts/ae444285eeb2d4f0d8d8249cd5c4d2df to your computer and use it in GitHub Desktop.
Configure Drupal via drush to use s3fs
# drush vset variable_name value
drush -l [domain.org] en s3fs --y
drush -l [domain.org] vset s3fs_bucket [bucket_name]
drush -l [domain.org] vset s3fs_region [region]
drush -l [domain.org] vset s3fs_use_cname FALSE
drush -l [domain.org] vset s3fs_use_customhost FALSE
drush -l [domain.org] vset s3fs_use_versioning TRUE
drush -l [domain.org] vset s3fs_cache_control_header public, max-age=300
drush -l [domain.org] vset s3fs_encryption aws:kms
drush -l [domain.org] vset s3fs_use_https FALSE
drush -l [domain.org] vset s3fs_ignore_cache FALSE
drush -l [domain.org] vset s3fs_use_s3_for_public TRUE
drush -l [domain.org] vset s3fs_no_rewrite_cssjs FALSE
drush -l [domain.org] vset s3fs_use_s3_for_private FALSE
drush -l [domain.org] vset s3fs_public_folder [domain]-public
drush -l [domain.org] vset s3fs_private_folder [domain]-private
drush -l [domain.org] vset awssdk2_access_key [YOUR ACCESS KEY]
drush -l [domain.org] vset awssdk2_secret_key [YOUR SECRET KEY]
drush -l [domain.org] vset awssdk2_use_instance_profile FALSE
# In case other modules added files to local public files directory
drush -l [domain.org] s3fs-copy-local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment