mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-24 13:48:14 -05:00
24 lines
428 B
Plaintext
24 lines
428 B
Plaintext
|
#!/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
|