[WIP][CI SKIP] nginx real_ip

This commit is contained in:
Drone CI
2019-01-29 20:29:12 +01:00
parent fb956cb777
commit dbacf11bd3
5 changed files with 15 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
LATEST=$SEAF/seafile-server-latest
PIDS=$SEAF/pids
PIDFILES=("$PIDS" "$LATEST/runtime" "/var/run/nginx")
COMMANDS=("seaf-server $LATEST/seafile.sh start" "seahub $LATEST/seahub.sh ${SEAF_HUB_MODE:-start} 8000" "nginx /usr/sbin/nginx")
COMMANDS=("seaf-server $LATEST/seafile.sh start" "seahub $LATEST/seahub.sh ${SEAF_HUB_MODE:-start} 8000" "nginx /usr/bin/start-nginx")
function stop {
#Kill when hitting CTRL+C repeatedly

7
scripts/start-ngix.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
echo "$SEAF_FRONTEND" | IFS=';' while read IP; do
echo "set_real_ip_from $IP;" >> /etc/nginx/realip.conf
done
#This script is only supposed to run once
rm -f $0 && ln -s /usr/sbin/nginx $0 && /usr/sbin/nginx