Skip to content

wsm25/nis1336-schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Schedule Manager

The SJTU NIS1336 coursework.

Development Deployment

Run yarn dev in /frontend and cargo run in /backend.

Production Deployment

Caution

The programme is really unstable and may contain tons of bugs. Do not deploy it to production environment.

First put frontend product to /var/www/schedule and backend server executive to /usr/local/bin, and mkdir /var/lib/private/schedule/db

Systemd configuration: /lib/systemd/system/nis1336-schedule.service

[Unit]
Description=nis1336 schedule
Documentation=https://github.com/wsm25/nis1336-schedule
After=network.target

[Service]
DynamicUser=true
Environment=SCHEDULE_PORT=8080
WorkingDirectory=/var/lib/schedule
StateDirectory=schedule
ExecStart=/usr/local/bin/schedule-server
Restart=on-abnormal
RestartSec=5s
KillMode=mixed

StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Nginx configuration: /etc/nginx/sites-enabled/nis1336-schedule

server {
    listen 8000;
    server_name YOUR_SERVER_NAME;
    location ~ ^/(api|auth) {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_redirect off;
            proxy_pass http://[::1]:8080;
            client_max_body_size 200m;
    }
    location / {
            root /var/www/schedule/;
    }
}

And then nginx -s reload && systemctl start nis1336-schedule

About

SJTU NIS1336 大作业 被迫分裂版

Resources

Stars

Watchers

Forks

Releases

No releases published