-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
66 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# nginx.conf | ||
events { } | ||
|
||
http { | ||
# the upstream component nginx needs to connect to | ||
|
||
|
||
# configuration of the server | ||
server { | ||
# the port your site will be served on | ||
listen 80; | ||
# the domain name it will serve for | ||
server_name localhost; # substitute your machine's IP address or FQDN | ||
charset utf-8; | ||
|
||
# max upload size | ||
client_max_body_size 75M; # adjust to taste | ||
ignore_invalid_headers off; | ||
|
||
location /media/ { | ||
proxy_buffering off; | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://minio:9000; | ||
} | ||
|
||
location /static/ { | ||
proxy_buffering off; | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://minio:9000; | ||
} | ||
|
||
location / { | ||
proxy_buffering off; | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://django:8000; | ||
} | ||
|
||
location /ws { | ||
proxy_pass http://django:8000; | ||
proxy_set_header Host $host; | ||
|
||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
|
||
proxy_redirect off; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
} | ||
} | ||
} |
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,12 @@ | ||
""" | ||
ASGI entrypoint. Configures Django and then runs the application | ||
defined in the ASGI_APPLICATION setting. | ||
""" | ||
|
||
import os | ||
import django | ||
from channels.routing import get_default_application | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") | ||
django.setup() | ||
application = get_default_application() |
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