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

SDSS-788: Add and configure stage file proxy #183

Merged
merged 10 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
"drupal/shs": "^2.0@RC",
"drupal/smart_date": "^3.5",
"drupal/smart_trim": "^2.0",
"drupal/stage_file_proxy": "^2.0",
"drupal/taxonomy_entity_index": "^1.8",
"drupal/taxonomy_menu": "^3.5",
"drupal/token_or": "^2.0",
Expand Down
123 changes: 110 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions config/envs/dev/stage_file_proxy.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hotlink: false
origin: 'https://sitename-prod.stanford.edu'
origin_dir: 'sites/[sitename]/files'
use_imagecache_root: false
verify: false
excluded_extensions: ''
6 changes: 6 additions & 0 deletions config/envs/local/stage_file_proxy.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hotlink: false
origin: 'https://sitename-prod.stanford.edu'
origin_dir: 'sites/[sitename]/files'
use_imagecache_root: false
verify: false
excluded_extensions: ''
6 changes: 6 additions & 0 deletions config/envs/stage/stage_file_proxy.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hotlink: false
origin: 'https://sitename-prod.stanford.edu'
origin_dir: 'sites/[sitename]/files'
use_imagecache_root: false
verify: false
excluded_extensions: ''
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ stackable: false
storage: folder
folder: ../config/envs/dev
module:
stage_file_proxy: 0
acquia_purge: 0
paranoia: 0
purge: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module:
dblog: 0
devel: 0
devel_php: 0
stage_file_proxy: 0
theme: { }
complete_list: { }
partial_list: { }
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ stackable: false
storage: folder
folder: ../config/envs/stage
module:
stage_file_proxy: 0
acquia_purge: 0
paranoia: 0
purge: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Drupal\Core\State\StateInterface;

/**
* Config overrides for stanford profile.
* Config overrides for SDSS profile.
*
* @package Drupal\sdss_profile\Config
*/
Expand Down
7 changes: 7 additions & 0 deletions docroot/sites/settings/config.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@
if (!EnvironmentDetector::isProdEnv()) {
$config['domain_301_redirect.settings']['enabled'] = FALSE;
}

// Set stage_file_proxy URL on non-production environments.
if (!EnvironmentDetector::isProdEnv()) {
// Set stage_file_proxy settings.
$config['stage_file_proxy.settings']['origin'] = "https://$site_name.stanford.edu";
joegl marked this conversation as resolved.
Show resolved Hide resolved
$config['stage_file_proxy.settings']['origin_dir'] = "sites/$site_name/files";
}
Loading