forked from FoundKeyGang/FoundKey
Fix formatting
This commit is contained in:
parent
8e30c86a9a
commit
c4415e9af3
1 changed files with 43 additions and 45 deletions
|
@ -77,16 +77,16 @@ If you're still encountering errors about some modules, use node-gyp:
|
||||||
user that will later run FoundKey, or it could cause problems later.
|
user that will later run FoundKey, or it could cause problems later.
|
||||||
The encoding of the database should be UTF-8.
|
The encoding of the database should be UTF-8.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo -u postgres psql
|
sudo -u postgres psql
|
||||||
```
|
```
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
create database foundkey with encoding = 'UTF8';
|
create database foundkey with encoding = 'UTF8';
|
||||||
create user foundkey with encrypted password '{YOUR_PASSWORD}';
|
create user foundkey with encrypted password '{YOUR_PASSWORD}';
|
||||||
grant all privileges on database foundkey to foundkey;
|
grant all privileges on database foundkey to foundkey;
|
||||||
\q
|
\q
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run the database initialisation
|
2. Run the database initialisation
|
||||||
`yarn run init`
|
`yarn run init`
|
||||||
|
@ -106,27 +106,25 @@ Just `NODE_ENV=production npm start`. GLHF!
|
||||||
|
|
||||||
2. Edit it, and paste this and save:
|
2. Edit it, and paste this and save:
|
||||||
|
|
||||||
|
```ini
|
||||||
```ini
|
[Unit]
|
||||||
[Unit]
|
Description=FoundKey daemon
|
||||||
Description=FoundKey daemon
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=foundkey
|
User=foundkey
|
||||||
ExecStart=/usr/bin/npm start
|
ExecStart=/usr/bin/npm start
|
||||||
WorkingDirectory=/home/foundkey/foundkey
|
WorkingDirectory=/home/foundkey/foundkey
|
||||||
Environment="NODE_ENV=production"
|
Environment="NODE_ENV=production"
|
||||||
TimeoutSec=60
|
TimeoutSec=60
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
SyslogIdentifier=foundkey
|
SyslogIdentifier=foundkey
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
3. Reload systemd and enable the foundkey service.
|
3. Reload systemd and enable the foundkey service.
|
||||||
|
|
||||||
|
@ -142,29 +140,29 @@ You can check if the service is running with `systemctl status foundkey`.
|
||||||
|
|
||||||
1. Copy the following text to `/etc/init.d/foundkey`:
|
1. Copy the following text to `/etc/init.d/foundkey`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
name=foundkey
|
name=foundkey
|
||||||
description="FoundKey daemon"
|
description="FoundKey daemon"
|
||||||
|
|
||||||
command="/usr/bin/npm"
|
command="/usr/bin/npm"
|
||||||
command_args="start"
|
command_args="start"
|
||||||
command_user="foundkey"
|
command_user="foundkey"
|
||||||
|
|
||||||
supervisor="supervise-daemon"
|
supervisor="supervise-daemon"
|
||||||
supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\""
|
supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\""
|
||||||
|
|
||||||
pidfile="/run/${RC_SVCNAME}.pid"
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
use logger
|
use logger
|
||||||
|
|
||||||
# alternatively, uncomment if using nginx reverse proxy
|
# alternatively, uncomment if using nginx reverse proxy
|
||||||
#use logger nginx
|
#use logger nginx
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Set the service to start on boot
|
2. Set the service to start on boot
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue