kopia lustrzana https://github.com/OpenDroneMap/WebODM
Env vars tweaks
rodzic
a2b8267cd5
commit
b9076d1e0e
2
.env
2
.env
|
@ -1,3 +1,3 @@
|
||||||
HOST=webodm.localhost
|
HOST=localhost
|
||||||
PORT=8000
|
PORT=8000
|
||||||
APP_MEDIA_DIR=appmedia
|
APP_MEDIA_DIR=appmedia
|
||||||
|
|
9
start.sh
9
start.sh
|
@ -58,6 +58,9 @@ if [[ "$1" = "--create-default-pnode" ]]; then
|
||||||
echo "from nodeodm.models import ProcessingNode; ProcessingNode.objects.update_or_create(hostname='node-odm-1', defaults={'hostname': 'node-odm-1', 'port': 3000})" | python manage.py shell
|
echo "from nodeodm.models import ProcessingNode; ProcessingNode.objects.update_or_create(hostname='node-odm-1', defaults={'hostname': 'node-odm-1', 'port': 3000})" | python manage.py shell
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export HOST="${HOST:=localhost}"
|
||||||
|
export PORT="${PORT:=8000}"
|
||||||
|
|
||||||
(sleep 5; echo
|
(sleep 5; echo
|
||||||
echo -e "\033[92m"
|
echo -e "\033[92m"
|
||||||
echo "Congratulations! └@(・◡・)@┐"
|
echo "Congratulations! └@(・◡・)@┐"
|
||||||
|
@ -65,7 +68,7 @@ echo ==========================
|
||||||
echo -e "\033[39m"
|
echo -e "\033[39m"
|
||||||
echo "If there are no errors, WebODM should be up and running!"
|
echo "If there are no errors, WebODM should be up and running!"
|
||||||
echo -e "\033[93m"
|
echo -e "\033[93m"
|
||||||
echo Open a web browser and navigate to http://localhost:8000
|
echo Open a web browser and navigate to http://$HOST:$PORT
|
||||||
echo -e "\033[39m"
|
echo -e "\033[39m"
|
||||||
echo -e "\033[91mNOTE:\033[39m Windows users using docker should replace localhost with the IP of their docker machine's IP. To find what that is, run: docker-machine ip") &
|
echo -e "\033[91mNOTE:\033[39m Windows users using docker should replace localhost with the IP of their docker machine's IP. To find what that is, run: docker-machine ip") &
|
||||||
|
|
||||||
|
@ -76,10 +79,6 @@ else
|
||||||
echo -e "\033[91mWARN:\033[39m /webodm/build/static does not exist, CSS, JS and other files might not be available."
|
echo -e "\033[91mWARN:\033[39m /webodm/build/static does not exist, CSS, JS and other files might not be available."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If this is invoked outside docker, we need to make sure
|
|
||||||
# envsubst returns a valid config file...
|
|
||||||
export HOST="${HOST:=webodm.localhost}"
|
|
||||||
|
|
||||||
echo "Generating nginx configurations from templates..."
|
echo "Generating nginx configurations from templates..."
|
||||||
for templ in nginx/*.template
|
for templ in nginx/*.template
|
||||||
do
|
do
|
||||||
|
|
|
@ -18,7 +18,7 @@ fi
|
||||||
|
|
||||||
# Set default ENV variables
|
# Set default ENV variables
|
||||||
export PORT="${WEBODM_PORT:=8000}"
|
export PORT="${WEBODM_PORT:=8000}"
|
||||||
export HOST="${WEBODM_HOST:=webodm.localhost}"
|
export HOST="${WEBODM_HOST:=localhost}"
|
||||||
export MEDIA_DIR="${WEBODM_MEDIA_DIR:=appmedia}"
|
export MEDIA_DIR="${WEBODM_MEDIA_DIR:=appmedia}"
|
||||||
|
|
||||||
usage(){
|
usage(){
|
||||||
|
@ -127,10 +127,9 @@ if [[ $1 = "start" ]]; then
|
||||||
environment_check
|
environment_check
|
||||||
echo "Starting WebODM..."
|
echo "Starting WebODM..."
|
||||||
|
|
||||||
|
echo "Host: $PORT"
|
||||||
echo -e "Host: \033[92m\033[1m$PORT\033[0m\033[39m"
|
echo "Port: $HOST"
|
||||||
echo -e "Port: \033[92m\033[1m$HOST\033[0m\033[39m"
|
echo "Media dir: $MEDIA_DIR"
|
||||||
echo -e "Media dir: \033[92m\033[1m$HOST\033[0m\033[39m"
|
|
||||||
|
|
||||||
start
|
start
|
||||||
elif [[ $1 = "stop" ]]; then
|
elif [[ $1 = "stop" ]]; then
|
||||||
|
|
Ładowanie…
Reference in New Issue