kopia lustrzana https://github.com/OpenDroneMap/WebODM
Letsencrypt port warning
rodzic
591bfa37ab
commit
68e2b2030a
|
@ -9,6 +9,7 @@ RUN mkdir /webodm
|
|||
WORKDIR /webodm
|
||||
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
|
||||
RUN apt-get -qq install -y nodejs
|
||||
|
||||
# Configure use of testing branch of Debian
|
||||
RUN printf "Package: *\nPin: release a=stable\nPin-Priority: 900\n" > /etc/apt/preferences.d/stable.pref
|
||||
|
@ -17,7 +18,7 @@ RUN printf "deb http://mirror.steadfast.net/debian/ stable main contrib n
|
|||
RUN printf "deb http://mirror.steadfast.net/debian/ testing main contrib non-free\ndeb-src http://mirror.steadfast.net/debian/ testing main contrib non-free" > /etc/apt/sources.list.d/testing.list
|
||||
|
||||
# Install Node.js GDAL, nginx, letsencrypt
|
||||
RUN apt-get -qq update && apt-get -qq install -t testing -y binutils libproj-dev gdal-bin nginx && apt-get -qq install -y nodejs gettext-base cron certbot
|
||||
RUN apt-get -qq update && apt-get -qq install -t testing -y binutils libproj-dev gdal-bin nginx && apt-get -qq install -y gettext-base cron certbot
|
||||
|
||||
# Install pip reqs
|
||||
ADD requirements.txt /webodm/
|
||||
|
|
13
webodm.sh
13
webodm.sh
|
@ -142,6 +142,7 @@ run(){
|
|||
|
||||
start(){
|
||||
command="docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml"
|
||||
|
||||
if [ "$SSL" = "YES" ]; then
|
||||
if [ ! -z "$SSL_KEY" ] && [ ! -e "$SSL_KEY" ]; then
|
||||
echo -e "\033[91mSSL key file does not exist: $SSL_KEY\033[39m"
|
||||
|
@ -161,7 +162,19 @@ start(){
|
|||
fi
|
||||
|
||||
echo "SSL will be enabled ($method)"
|
||||
|
||||
# Check port settings
|
||||
# as let's encrypt cannot communicate on ports
|
||||
# different than 80 or 443
|
||||
if [ "$method" = "Lets Encrypt" ]; then
|
||||
if [ "$PORT" != "$DEFAULT_PORT" ]; then
|
||||
echo -e "\033[93mLets Encrypt cannot run on port: $PORT, switching to 443.\033[39m"
|
||||
echo "If you need to use a different port, you'll need to generate the SSL certificate files separately and use the --ssl-key and --ssl-certificate options."
|
||||
fi
|
||||
export PORT=443
|
||||
fi
|
||||
fi
|
||||
|
||||
run "$command start || $command up"
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue