Skip to content

Commit cdb8bec

Browse files
author
Derek Tamsen
committed
adding ability to set custom app module load path for gunicorn
1 parent 69a7600 commit cdb8bec

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

manifests/gunicorn.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
# [*environment*]
2626
# Set ENVIRONMENT variable. Default: none
2727
#
28+
# [*appmodule*]
29+
# Set the application module name for gunicorn to load when not using Django.
30+
# Default: app:app
31+
#
2832
# [*template*]
2933
# Which ERB template to use. Default: python/gunicorn.erb
3034
#
@@ -39,6 +43,7 @@
3943
# environment => 'prod',
4044
# owner => 'www-data',
4145
# group => 'www-data',
46+
# appmodule => 'app:app',
4247
# template => 'python/gunicorn.erb',
4348
# }
4449
#
@@ -57,6 +62,7 @@
5762
$environment = false,
5863
$owner = 'www-data',
5964
$group = 'www-data',
65+
$appmodule = 'app:app',
6066
$template = 'python/gunicorn.erb',
6167
) {
6268

templates/gunicorn.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CONFIG = {
3131
'--workers=<%= @processorcount.to_i*2 %>',
3232
'--timeout=30',
3333
<% if @mode != 'django' -%>
34-
'app:app',
34+
'<%= @appmodule %>',
3535
<% end -%>
3636
),
3737
}

0 commit comments

Comments
 (0)