use APP_KEY from environment if available for the secret key
Merge pull request #3132 from winglian/develop

use APP_KEY from environment if available for the secret key