-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add config for uwsgi and nginx - fix bug with upload progressbar and …
…file input in video form
- Loading branch information
Showing
12 changed files
with
139 additions
and
6 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,4 @@ | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
python manage.py loaddata pod/video/fixtures/initial_data.json | ||
python manage.py loaddata pod/main/fixtures/initial_data.json |
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
1 change: 1 addition & 0 deletions
1
pod/main/static/js/silvermine-videojs-quality-selector.min.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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 @@ | ||
# mysite_nginx.conf | ||
# Add this line in /etc/nginx/nginx.conf | ||
#http { | ||
# [...] | ||
# # reserve 1MB under the name 'uploads' to track uploads | ||
# upload_progress uploadp 1m; | ||
# [...] | ||
#} | ||
# the upstream component nginx needs to connect to | ||
upstream django { | ||
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket | ||
server unix:///usr/local/django_projects/podv2/podv2.sock; | ||
# server 127.0.0.1:8001; # for a web port socket (we'll use this first) | ||
} | ||
|
||
# configuration of the server | ||
server { | ||
# the port your site will be served on | ||
listen 8000; | ||
# the domain name it will serve for | ||
server_name pc-lci-info-01.univ-lille1.fr; # substitute your machine's IP address or FQDN | ||
charset utf-8; | ||
|
||
# max upload size | ||
client_max_body_size 4G; # adjust to taste | ||
|
||
#location ^~ /video_edit { | ||
# track_uploads uploadp 30s | ||
#} | ||
|
||
location ^~ /progressbarupload/upload_progress { | ||
# JSON document rather than JSONP callback, pls | ||
upload_progress_json_output; | ||
report_uploads uploadp; | ||
} | ||
|
||
# Django media | ||
location /media { | ||
alias /usr/local/django_projects/podv2/pod/media; # your Django project's media files - amend as required | ||
} | ||
|
||
location /static { | ||
alias /usr/local/django_projects/podv2/pod/static; # your Django project's static files - amend as required | ||
} | ||
|
||
# Finally, send all non-media requests to the Django server. | ||
location / { | ||
uwsgi_pass django; | ||
include /usr/local/django_projects/podv2/uwsgi_params; # the uwsgi_params file you installed | ||
track_uploads uploadp 30s; | ||
} | ||
} |
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,24 @@ | ||
# pod_uwsgi.ini file | ||
[uwsgi] | ||
|
||
# Django-related settings | ||
# the base directory (full path) | ||
chdir = /home/pod/django_projects/podv2 | ||
# Django's wsgi file | ||
module = pod.wsgi | ||
# the virtualenv (full path) | ||
home = /home/pod/.virtualenvs/django_pod | ||
# process-related settings | ||
# master | ||
master = true | ||
# maximum number of worker processes | ||
processes = 10 | ||
# the socket (use the full path to be safe | ||
socket = /home/pod/django_projects/podv2/podv2.sock | ||
# http = :8000 | ||
# ... with appropriate permissions - may be needed | ||
chmod-socket = 666 | ||
# clear environment on exit | ||
vacuum = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# test.py | ||
def application(env, start_response): | ||
start_response('200 OK', [('Content-Type','text/html')]) | ||
return [b"Hello World"] # python3 | ||
|
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,17 @@ | ||
uwsgi_param QUERY_STRING $query_string; | ||
uwsgi_param REQUEST_METHOD $request_method; | ||
uwsgi_param CONTENT_TYPE $content_type; | ||
uwsgi_param CONTENT_LENGTH $content_length; | ||
|
||
uwsgi_param REQUEST_URI $request_uri; | ||
uwsgi_param PATH_INFO $document_uri; | ||
uwsgi_param DOCUMENT_ROOT $document_root; | ||
uwsgi_param SERVER_PROTOCOL $server_protocol; | ||
uwsgi_param REQUEST_SCHEME $scheme; | ||
uwsgi_param HTTPS $https if_not_empty; | ||
|
||
uwsgi_param REMOTE_ADDR $remote_addr; | ||
uwsgi_param REMOTE_PORT $remote_port; | ||
uwsgi_param SERVER_PORT $server_port; | ||
uwsgi_param SERVER_NAME $server_name; | ||
|