Skip to content

Commit

Permalink
add support for .pumaenv file (#251)
Browse files Browse the repository at this point in the history
* add support for .pumaenv file

Since using `.powenv` feels wrong, since this is not pow, and `.env` conflicts with Docker's default `.env` loading (Docker only supports plain variable assignments), I figured it might be good to have a Puma-named env file.

* Update README.md
  • Loading branch information
koenpunt authored Jun 4, 2020
1 parent e264766 commit 5af3181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ Puma-dev supports loading environment variables before puma starts. It checks fo
* `.env`
* `.powrc`
* `.powenv`
* `.pumaenv`

Additionally, puma-dev uses a few environment variables to control how puma is started that you can overwrite in your loaded shell config.

Expand Down
4 changes: 4 additions & 0 deletions dev/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ if test -e .powenv; then
source .powenv
fi
if test -e .pumaenv; then
source .pumaenv
fi
if test -e Gemfile && bundle exec puma -V &>/dev/null; then
exec bundle exec puma -C $CONFIG --tag puma-dev:%s -w $WORKERS -t 0:$THREADS -b unix:%s
fi
Expand Down

0 comments on commit 5af3181

Please sign in to comment.