Download the PHP package cba85/heroku-dotenv without Composer
On this page you can find all versions of the php package cba85/heroku-dotenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cba85/heroku-dotenv
More information about cba85/heroku-dotenv
Files in cba85/heroku-dotenv
Package heroku-dotenv
Short Description Copy php `.env` variables to or from Heroku environment variables
License MIT
Homepage https://github.com/cba85/heroku-dotenv
Informations about the package heroku-dotenv
Heroku Dotenv
⌨️ Copy php .env
variables to or from Heroku environment variables.
Why creating this package?
I've created this package because I often use PHP projects/frameworks that use vlucas/phpdotenv package to handle PHP environment values in a .env
file.
You can't create/modify files in your Heroku server using Heroku CLI (ok, in fact you can), and you can't create your production .env
file, so you have to manually create your environment variables using Heroku CLI or on your Heroku dashboard.
This PHP script can automatically copy environment variables in a .env file to and from Heroku.
Requirements
Heroku CLI
This PHP script uses Heroku CLI. You must have installed it on your machine.
Composer
Make sure Composer is installed globally.
Install
Then make sure you have the global Composer binaries directory in your PATH.
This directory is platform-dependent, see Composer documentation for details.
Update
Usage
Go to your project folder that contains a .env
file.
Send .env file to Heroku environment
Save Heroku environment to .env file
Options
-f, --file
Name or path of your project .env
file.
Tests
The package contains a dotenv file for testing, located in example/
folder.
Where
heroku_app_name
is a valid Heroku app.