Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Set a default APP_ENV. #1

Merged
merged 1 commit into from
Jan 30, 2018
Merged
Changes from all 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
7 changes: 7 additions & 0 deletions platformsh-flex-env.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ function mapPlatformShEnvironment() : void
if (!getenv('APP_SECRET') && getenv('PLATFORM_PROJECT_ENTROPY')) {
putenv('APP_SECRET=' . getenv('PLATFORM_PROJECT_ENTROPY'));
}

// Default to production. You can override this value by setting
// `env:APP_ENV` as a project variable, or by adding it to the
// .platform.app.yaml variables block.
if (!getenv('APP_ENV')) {
putenv('APP_ENV=prod');
}
}