Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ Manages Gunicorn virtual hosts.

**environment** - Set ENVIRONMENT variable. Default: none

**appmodule** - Set the application module name for gunicorn to load when not using Django. Default: app:app

**template** - Which ERB template to use. Default: python/gunicorn.erb

```puppet
Expand All @@ -182,6 +184,7 @@ Manages Gunicorn virtual hosts.
dir => '/var/www/project1/current',
bind => 'unix:/tmp/gunicorn.socket',
environment => 'prod',
appmodule => 'app:app',
template => 'python/gunicorn.erb',
}
```
Expand Down
6 changes: 6 additions & 0 deletions manifests/gunicorn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
# [*environment*]
# Set ENVIRONMENT variable. Default: none
#
# [*appmodule*]
# Set the application module name for gunicorn to load when not using Django.
# Default: app:app
#
# [*template*]
# Which ERB template to use. Default: python/gunicorn.erb
#
Expand All @@ -39,6 +43,7 @@
# environment => 'prod',
# owner => 'www-data',
# group => 'www-data',
# appmodule => 'app:app',
# template => 'python/gunicorn.erb',
# }
#
Expand All @@ -57,6 +62,7 @@
$environment = false,
$owner = 'www-data',
$group = 'www-data',
$appmodule = 'app:app',
$template = 'python/gunicorn.erb',
) {

Expand Down
2 changes: 1 addition & 1 deletion templates/gunicorn.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONFIG = {
'--workers=<%= @processorcount.to_i*2 %>',
'--timeout=30',
<% if @mode != 'django' -%>
'app:app',
'<%= @appmodule %>',
<% end -%>
),
}