fixed service
This commit is contained in:
parent
188c81b572
commit
5496146053
8
app.sh
8
app.sh
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
BASE=$(dirname $0)
|
||||
cd $BASE
|
||||
git pull
|
||||
source env/bin/activate
|
||||
pip3 install -r requirements.txt
|
||||
gunicorn -D --bind 0.0.0.0:80 --pid /var/run/webapp.pid wsgi:app
|
13
entrypoint.sh
Normal file
13
entrypoint.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
BASE=$(dirname $0)
|
||||
cd $BASE
|
||||
git pull
|
||||
if [ -d env ];
|
||||
then
|
||||
python3 -m venv env
|
||||
fi
|
||||
|
||||
source env/bin/activate
|
||||
pip3 install -U -r requirements.txt
|
||||
gunicorn -D --bind 0.0.0.0:8080 --pid /run/webapp.pid wsgi:app
|
@ -1,12 +1,13 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="busybox $SVCNAME"
|
||||
command="/opt/webapp/app.sh"
|
||||
command_args=""
|
||||
name="scratch-cloudvars-server"
|
||||
command="/data/entrypoint.sh"
|
||||
pidfile="/var/run/$SVCNAME.pid"
|
||||
command_background="yes"
|
||||
output_logger="/usr/bin/logger"
|
||||
error_logger="/usr/bin/logger"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns
|
||||
use logger
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user