Closed Naramsim closed 7 years ago
would prefer
$dotenv = new Dotenv\Dotenv();
if(getenv('APP_ENV') === 'development') {
$dotenv->load(__DIR__);
}
Are we also missing phpdotenv from composer.json? -- I see this is in #5 so maybe a merge thing
ED: See this comment on pull request 5 for more background
Hi, you can build the image as usual with
docker build -t slackemon .
and start a server with
docker run -p 80:80 -v ${PWD}:/var/www/html -it --rm --env-file ./.env --name slackemonInstance slackemon
The -v switch allows you to mount a local volume to the Docker container, so one can modify local files and those will sync in the Docker container, so development becomes quicker.
I think we should create a wrapper around Dotenv. In a way that first env vars should be fetched by memory using PHP native getenv, if not present using Dotenv.