Version 3 starter

This commit is contained in:
Jamie Curnow
2021-06-14 19:29:35 +10:00
parent 60fc57431a
commit 6205434140
642 changed files with 25817 additions and 32319 deletions

View File

@@ -0,0 +1,5 @@
#!/usr/bin/execlineb -S1
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -0,0 +1,23 @@
#!/usr/bin/with-contenv bash
RESET='\E[0m'
YELLOW='\E[1;33m'
echo -e "${YELLOW}Starting backend API ...${RESET}"
if [ "$DEVELOPMENT" == "true" ]; then
HOME=/tmp/npmuserhome
GOPATH="$HOME/go"
mkdir -p "$GOPATH"
chown -R npmuser:npmuser "$GOPATH"
export HOME GOPATH
cd /app/backend || exit 1
s6-setuidgid npmuser task -w
else
cd /app/bin || exit 1
while :
do
s6-setuidgid npmuser /app/bin/server
sleep 1
done
fi