fix typos
This commit is contained in:
parent
76233f2032
commit
9ee4d49cb7
3 changed files with 21 additions and 17 deletions
|
|
@ -10,7 +10,7 @@ RUN apt-get update \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -r /var/lib/apt/lists/*
|
&& rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN AUTOUPGRADE=1 LE_WORKING_DIR=/acme.sh LE_CONFIG_HOME /acmecerts wget -O- https://get.acme.sh | sh
|
RUN AUTOUPGRADE=1 LE_WORKING_DIR=/acme.sh LE_CONFIG_HOME=/acmecerts wget -O- https://get.acme.sh | sh
|
||||||
|
|
||||||
# Configure Nginx and apply fix for very long server names
|
# Configure Nginx and apply fix for very long server names
|
||||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
|
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ server {
|
||||||
|
|
||||||
{{ $enable_acme := eq (or ($.Env.ENABLE_ACME) "") "true" }}
|
{{ $enable_acme := eq (or ($.Env.ENABLE_ACME) "") "true" }}
|
||||||
{{ if $enable_acme }}
|
{{ if $enable_acme }}
|
||||||
#{{ACMD_DOMAINS $host_list}}
|
#ACME_DOMAINS{{$host_list}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
# {{ $host }}
|
# {{ $host }}
|
||||||
upstream {{ $upstream_name }} {
|
upstream {{ $upstream_name }} {
|
||||||
|
|
|
||||||
34
updatessl.sh
34
updatessl.sh
|
|
@ -13,22 +13,26 @@ CERTS="/etc/nginx/certs"
|
||||||
|
|
||||||
updatessl() {
|
updatessl() {
|
||||||
|
|
||||||
for d_list in $(grep ACMD_DOMAINS $DEFAULT_CONF | cut -d ' ' -f 2);
|
if grep ACME_DOMAINS $DEFAULT_CONF ; then
|
||||||
do
|
for d_list in $(grep ACME_DOMAINS $DEFAULT_CONF | cut -d ' ' -f 2);
|
||||||
d=$(echo "$d_list" | cut -d , -f 1)
|
do
|
||||||
$ACME_BIN --issue \
|
d=$(echo "$d_list" | cut -d , -f 1)
|
||||||
-d $d_list \
|
$ACME_BIN --issue \
|
||||||
-w $NGINX_HOME/html \
|
-d $d_list \
|
||||||
--pre-hook "$_SCRIPT_ pre_hook $DEFAULT_CONF" \
|
-w $NGINX_HOME/html \
|
||||||
--post-hook "$_SCRIPT_ post_hook $DEFAULT_CONF" \
|
--pre-hook "$_SCRIPT_ pre_hook $DEFAULT_CONF" \
|
||||||
--fullchain-file "$CERTS\$d.crt" \
|
--post-hook "$_SCRIPT_ post_hook $DEFAULT_CONF" \
|
||||||
--key-file "$CERTS\$d.crt" \
|
--fullchain-file "$CERTS\$d.crt" \
|
||||||
--reloadcmd "service nginx configtest && service force-reload"
|
--key-file "$CERTS\$d.crt" \
|
||||||
done
|
--reloadcmd "service nginx configtest && service force-reload"
|
||||||
|
done
|
||||||
|
|
||||||
#generate nginx conf again.
|
#generate nginx conf again.
|
||||||
docker-gen /app/nginx.tmpl /etc/nginx/conf.d/default.conf
|
docker-gen /app/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||||
service nginx configtest && service force-reload
|
service nginx configtest && service force-reload
|
||||||
|
else
|
||||||
|
echo "skip updatessl"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue