update system integration and readme
This commit is contained in:
parent
e0568e4b64
commit
91dee6d2b4
5 changed files with 44 additions and 47 deletions
44
etc/nginx/sites-available/oxdata
Normal file
44
etc/nginx/sites-available/oxdata
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name oxdata;
|
||||
|
||||
access_log /var/log/nginx/oxdata.access.log;
|
||||
|
||||
location /admin/media {
|
||||
root /srv/oxdata/lib/python3.5/site-packages/django/contrib;
|
||||
autoindex on;
|
||||
}
|
||||
location /favicon.ico {
|
||||
root /srv/oxdata/oxdata/static;
|
||||
}
|
||||
location /robots.txt {
|
||||
root /srv/oxdata/oxdata/static;
|
||||
}
|
||||
|
||||
location /static {
|
||||
root /srv/oxdata/oxdata;
|
||||
autoindex on;
|
||||
}
|
||||
location /media/ {
|
||||
internal;
|
||||
root /srv/oxdata/oxdata/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto http;
|
||||
proxy_redirect off;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
proxy_pass http://127.0.0.1:8087;
|
||||
break;
|
||||
}
|
||||
}
|
||||
error_page 404 /404.html;
|
||||
error_page 403 /404.html;
|
||||
location /404.html {
|
||||
root /srv/oxdata/oxdata/static;
|
||||
}
|
||||
|
||||
}
|
||||
23
etc/systemd/system/oxdata.service
Normal file
23
etc/systemd/system/oxdata.service
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
[Unit]
|
||||
Description=oxdata daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=oxdata
|
||||
Group=oxdata
|
||||
PIDFile=/run/oxdata/oxdata.pid
|
||||
WorkingDirectory=/srv/oxdata/oxdata
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStart=/srv/oxdata/bin/gunicorn \
|
||||
wsgi:application \
|
||||
-p /run/oxdata/oxdata.pid \
|
||||
--bind 0.0.0.0:8087 \
|
||||
--workers 5 \
|
||||
--max-requests 1000 \
|
||||
--log-level info
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
2
etc/tmpfiles.d/oxdata.conf
Normal file
2
etc/tmpfiles.d/oxdata.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
d /run/oxdata 0755 oxdata oxdata -
|
||||
d /var/log/oxdata 0755 oxdata oxdata -
|
||||
Loading…
Add table
Add a link
Reference in a new issue