Letsencrypt port warning

pull/332/head
Piero Toffanin 2017-11-17 14:03:24 -05:00
rodzic 591bfa37ab
commit 68e2b2030a
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -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/

Wyświetl plik

@ -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"
}