-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e000fb3
commit 90b8fc9
Showing
5 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
server { | ||
listen 80; | ||
charset utf-8; | ||
client_max_body_size 20M; | ||
|
||
location /static/ { | ||
gzip_static on; | ||
alias /app/staticfiles/; | ||
} | ||
|
||
location /index.html { | ||
gzip_static on; | ||
alias /app/osmchadjango/frontend/templates/frontend/index.html; | ||
} | ||
|
||
location / { | ||
# checks for static file, if not found proxy to app | ||
try_files $uri @proxy_to_app; | ||
} | ||
|
||
# cookiecutter-django app | ||
location @proxy_to_app { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
proxy_pass http://127.0.0.1:5000; | ||
fastcgi_connect_timeout 130; | ||
fastcgi_send_timeout 130; | ||
fastcgi_read_timeout 130; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[program:gunicorn] | ||
command=/usr/local/bin/gunicorn config.wsgi -b localhost:5000 -w 4 --log-file /var/log/gunicorn.error --access-logfile /var/log/gunicorn.access --capture-output --timeout 120 | ||
directory=/app | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:nginx] | ||
command=/usr/sbin/nginx |