Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature runit for webservice #493

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions runit/paster-service/log/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -u root svlogd -tt /home/bookie/Bookie/runit/paster-service/logs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems odd that it's got a full path defined. Isn't this very not portable?

Empty file.
1 change: 1 addition & 0 deletions runit/paster-service/log/supervise/pid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12618
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the log/pid be part of this commit? That pid will change each time it's run right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lock file above seems to fit into the same category.

1 change: 1 addition & 0 deletions runit/paster-service/log/supervise/stat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run
Binary file added runit/paster-service/log/supervise/status
Binary file not shown.
Empty file.
Empty file added runit/paster-service/logs/lock
Empty file.
12 changes: 12 additions & 0 deletions runit/paster-service/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
exec 2>&1
set -e

PASTER=/home/bookie/Bookie/bin/paster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems the meat of what is required. The paths I think should be generated via either the makefile or something that knows the path vs requiring all other users to use the same path.

ROOT=/home/bookie/Bookie
VENV=/home/bookie/Bookie/bin/activate

cd $ROOT
. $VENV

exec chpst -u root $PASTER serve bookie.ini
Empty file.
1 change: 1 addition & 0 deletions runit/paster-service/supervise/pid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12619
1 change: 1 addition & 0 deletions runit/paster-service/supervise/stat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run
Binary file added runit/paster-service/supervise/status
Binary file not shown.