Skip to content

Commit

Permalink
Fix mounted codebase env var name #5
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Feb 7, 2023
1 parent 070cac1 commit 7779a48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ All images built for `linux/amd64` and `linux/arm64`

## Environment Variables

| Variable | Default Value | Description |
|-------------------------------|---------------------|-------------|
| `WEBGRIND_STORAGE_DIR` | | |
| `WEBGRIND_PROFILER_DIR` | `/tmp` | |
| `WEBGRIND_DEFAULT_TIMEZONE` | `Europe/Copenhagen` | |
| `WEBGRIND_ORIG_CODEBASE_PATH` | `/var/www/html` | |
| `MOUNTED_CODEBASE_PATH` | `/mnt/codebase` | |
| Variable | Default Value | Description |
|----------------------------------|---------------------|-------------|
| `WEBGRIND_STORAGE_DIR` | | |
| `WEBGRIND_PROFILER_DIR` | `/tmp` | |
| `WEBGRIND_DEFAULT_TIMEZONE` | `Europe/Copenhagen` | |
| `WEBGRIND_ORIG_CODEBASE_PATH` | `/var/www/html` | |
| `WEBGRIND_MOUNTED_CODEBASE_PATH` | `/mnt/codebase` | |

See [wodby/php](https://github.com/wodby/php) for more variables
2 changes: 1 addition & 1 deletion templates/config.php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Webgrind_Config extends Webgrind_MasterConfig {
*/
static function exposeServerFile($file) {
$orig_code_base_path = '{{ getenv "WEBGRIND_ORIG_CODEBASE_PATH" "/var/www/html" }}';
$mounted_codebase_path = '{{ getenv "MOUNTED_CODEBASE_PATH" "/mnt/codebase" }}';
$mounted_codebase_path = '{{ getenv "WEBGRIND_MOUNTED_CODEBASE_PATH" "/mnt/codebase" }}';
if (substr($file, 0, strlen($orig_code_base_path)) === $orig_code_base_path) {
return str_replace($orig_code_base_path, $mounted_codebase_path, $file); // Grant access to all files on server.
Expand Down

0 comments on commit 7779a48

Please sign in to comment.