-
Clone the repo
-
create a db directory
mkdir db
- create a systemd service file
[Unit]
Description=bbs-daemon for buntin-bbs service(https://bbs.buntin.xyz)
After=syslog.target network.target
[Service]
Type=simple
Restart=always
KillMode=process
WorkingDirectory=/home/buntin/bbs-daemon
ExecStart=(nodeの絶対パス) (/home/buntin/bbs-daemon/build/index.js)
User=buntin
Group=buntin
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=bbs
[Install]
WantedBy=multi-user.target
- create a nginx config file
server {
listen 80;
server_name bbs.buntin.xyz;
location / {
proxy_pass http://localhost:3001;
}
}
- start the service
systemctl status bbs
systemctl daemon-reload
systemctl start bbs