add forum

This commit is contained in:
virusdefender 2018-05-08 07:35:07 +08:00
parent 353056bd1d
commit 568a735eec
3 changed files with 26 additions and 0 deletions

View File

@ -20,6 +20,15 @@ location /.well-known {
alias /data/ssl/.well-known; alias /data/ssl/.well-known;
} }
location /forum {
proxy_pass http://forum;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
client_max_body_size 200M;
proxy_http_version 1.1;
proxy_set_header Connection '';
}
location / { location / {
root /app/dist; root /app/dist;
try_files $uri $uri/ /index.html =404; try_files $uri $uri/ /index.html =404;

View File

@ -32,6 +32,11 @@ http {
keepalive 32; keepalive 32;
} }
upstream forum {
server 127.0.0.1:8081;
keepalive 32;
}
server { server {
listen 8000 default_server; listen 8000 default_server;
server_name _; server_name _;

View File

@ -39,6 +39,18 @@ startsecs=5
stopwaitsecs = 5 stopwaitsecs = 5
killasgroup=true killasgroup=true
[program:forum]
command=sh -c "python3 manage.py runserver 8081"
directory=/app/forum/
user=nobody
stdout_logfile=/data/log/forum.log
stderr_logfile=/data/log/forum.log
autostart=true
autorestart=true
startsecs=5
stopwaitsecs = 5
killasgroup=true
[program:celery] [program:celery]
command=celery -A oj worker -l warning command=celery -A oj worker -l warning
directory=/app/ directory=/app/