mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-03-03 00:43:34 +09:00
Compare commits
83 Commits
1.11.0-ls3
...
1.16.0-ls6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae590fab05 | ||
|
|
cc003df158 | ||
|
|
0546211470 | ||
|
|
056f27437e | ||
|
|
7437478c3a | ||
|
|
020ab44638 | ||
|
|
224abb686d | ||
|
|
413942d1fe | ||
|
|
a8f98a205f | ||
|
|
aa94da0665 | ||
|
|
31d9e9af85 | ||
|
|
012e729f49 | ||
|
|
dbfe483f22 | ||
|
|
27e727eede | ||
|
|
1cc2e4d395 | ||
|
|
12386fbfc7 | ||
|
|
fcd004dfdc | ||
|
|
2ea807dd02 | ||
|
|
49bd204b51 | ||
|
|
24c5e9f243 | ||
|
|
c48705cbc4 | ||
|
|
f0514ebdc1 | ||
|
|
b1ae12189f | ||
|
|
d77a64aab8 | ||
|
|
e2e39b9f89 | ||
|
|
870cd4bd93 | ||
|
|
6aa2e01ec3 | ||
|
|
4d1c0d286b | ||
|
|
1cb549ede1 | ||
|
|
706e133b60 | ||
|
|
fffa782d67 | ||
|
|
9d016ec049 | ||
|
|
e116a1829e | ||
|
|
1f54740dc0 | ||
|
|
d675686e17 | ||
|
|
7cb21be1d1 | ||
|
|
50b3c86a9e | ||
|
|
6217372efe | ||
|
|
8ff31a71c1 | ||
|
|
ff56929cf7 | ||
|
|
28cdf9b8c6 | ||
|
|
0ac5a2a4f2 | ||
|
|
36495ea204 | ||
|
|
a9be9a304f | ||
|
|
867da78277 | ||
|
|
c0f8b3a8b2 | ||
|
|
9463ffdc73 | ||
|
|
4a43425d74 | ||
|
|
7f0a3bfa80 | ||
|
|
6f8101e9b1 | ||
|
|
1a16a7c415 | ||
|
|
a134aa0d41 | ||
|
|
30d407e922 | ||
|
|
79d8ff0378 | ||
|
|
2988ac4a5f | ||
|
|
a158c34ab9 | ||
|
|
ed57a1038e | ||
|
|
a8c55b455a | ||
|
|
f0be12bcda | ||
|
|
adfe04cedb | ||
|
|
d075d3e2c3 | ||
|
|
a84c6883a6 | ||
|
|
61a5c40902 | ||
|
|
0a32a84d8a | ||
|
|
e7b5816304 | ||
|
|
b71f99cb7b | ||
|
|
dbd8fd4bd0 | ||
|
|
9074cf2d44 | ||
|
|
479ee5eac1 | ||
|
|
d7ce59b839 | ||
|
|
69fdcc1ff3 | ||
|
|
00484f51d8 | ||
|
|
363ba433cc | ||
|
|
de98308c70 | ||
|
|
db657fa06a | ||
|
|
6f25f82996 | ||
|
|
ea8b193858 | ||
|
|
d5c8106aac | ||
|
|
cd5f29a8b0 | ||
|
|
693da376b7 | ||
|
|
d9f3a34a42 | ||
|
|
8ac274550f | ||
|
|
07e1ab096c |
7
.github/CONTRIBUTING.md
vendored
7
.github/CONTRIBUTING.md
vendored
@@ -96,7 +96,7 @@ If you are proposing additional packages to be added, ensure that you added the
|
||||
|
||||
### Testing your changes
|
||||
|
||||
```
|
||||
```bash
|
||||
git clone https://github.com/linuxserver/docker-swag.git
|
||||
cd docker-swag
|
||||
docker build \
|
||||
@@ -106,13 +106,14 @@ docker build \
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
```
|
||||
|
||||
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
|
||||
|
||||
## Update the chagelog
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-swag/tree/master/root), add an entry to the changelog
|
||||
|
||||
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.jenkins-external
|
||||
276
Dockerfile
276
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.12
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.13
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
@@ -12,141 +12,145 @@ ENV DHLEVEL=2048 ONLY_SUBDOMAINS=false AWS_CONFIG_FILE=/config/dns-conf/route53.
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-lua \
|
||||
nginx-mod-http-lua-upstream \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
curl -o \
|
||||
/defaults/dhparams.pem -L \
|
||||
"https://lsio.ams3.digitaloceanspaces.com/dhparams.pem" && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
cargo \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-brotli \
|
||||
nginx-mod-http-dav-ext \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-gmp \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-mailparse \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache \
|
||||
/root/.cargo
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.12
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.13
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
@@ -12,141 +12,145 @@ ENV DHLEVEL=2048 ONLY_SUBDOMAINS=false AWS_CONFIG_FILE=/config/dns-conf/route53.
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-lua \
|
||||
nginx-mod-http-lua-upstream \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
curl -o \
|
||||
/defaults/dhparams.pem -L \
|
||||
"https://lsio.ams3.digitaloceanspaces.com/dhparams.pem" && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
cargo \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-brotli \
|
||||
nginx-mod-http-dav-ext \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-gmp \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-mailparse \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache \
|
||||
/root/.cargo
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
276
Dockerfile.armhf
276
Dockerfile.armhf
@@ -1,4 +1,4 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.12
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.13
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
@@ -12,141 +12,145 @@ ENV DHLEVEL=2048 ONLY_SUBDOMAINS=false AWS_CONFIG_FILE=/config/dns-conf/route53.
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-lua \
|
||||
nginx-mod-http-lua-upstream \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
curl -o \
|
||||
/defaults/dhparams.pem -L \
|
||||
"https://lsio.ams3.digitaloceanspaces.com/dhparams.pem" && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
cargo \
|
||||
g++ \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
python3-dev && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache --upgrade \
|
||||
curl \
|
||||
fail2ban \
|
||||
gnupg \
|
||||
memcached \
|
||||
nginx \
|
||||
nginx-mod-http-brotli \
|
||||
nginx-mod-http-dav-ext \
|
||||
nginx-mod-http-echo \
|
||||
nginx-mod-http-fancyindex \
|
||||
nginx-mod-http-geoip2 \
|
||||
nginx-mod-http-headers-more \
|
||||
nginx-mod-http-image-filter \
|
||||
nginx-mod-http-nchan \
|
||||
nginx-mod-http-perl \
|
||||
nginx-mod-http-redis2 \
|
||||
nginx-mod-http-set-misc \
|
||||
nginx-mod-http-upload-progress \
|
||||
nginx-mod-http-xslt-filter \
|
||||
nginx-mod-mail \
|
||||
nginx-mod-rtmp \
|
||||
nginx-mod-stream \
|
||||
nginx-mod-stream-geoip2 \
|
||||
nginx-vim \
|
||||
php7-bcmath \
|
||||
php7-bz2 \
|
||||
php7-ctype \
|
||||
php7-curl \
|
||||
php7-dom \
|
||||
php7-exif \
|
||||
php7-ftp \
|
||||
php7-gd \
|
||||
php7-gmp \
|
||||
php7-iconv \
|
||||
php7-imap \
|
||||
php7-intl \
|
||||
php7-ldap \
|
||||
php7-mcrypt \
|
||||
php7-memcached \
|
||||
php7-mysqli \
|
||||
php7-mysqlnd \
|
||||
php7-opcache \
|
||||
php7-pdo_mysql \
|
||||
php7-pdo_odbc \
|
||||
php7-pdo_pgsql \
|
||||
php7-pdo_sqlite \
|
||||
php7-pear \
|
||||
php7-pecl-apcu \
|
||||
php7-pecl-mailparse \
|
||||
php7-pecl-redis \
|
||||
php7-pgsql \
|
||||
php7-phar \
|
||||
php7-posix \
|
||||
php7-soap \
|
||||
php7-sockets \
|
||||
php7-sodium \
|
||||
php7-sqlite3 \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-xmlreader \
|
||||
php7-xmlrpc \
|
||||
php7-xsl \
|
||||
php7-zip \
|
||||
py3-cryptography \
|
||||
py3-future \
|
||||
py3-pip \
|
||||
whois && \
|
||||
echo "**** install certbot plugins ****" && \
|
||||
if [ -z ${CERTBOT_VERSION+x} ]; then \
|
||||
CERTBOT="certbot"; \
|
||||
else \
|
||||
CERTBOT="certbot==${CERTBOT_VERSION}"; \
|
||||
fi && \
|
||||
pip3 install -U \
|
||||
pip && \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-google \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
certbot-dns-nsone \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
echo "**** copy fail2ban default action and filter to /default ****" && \
|
||||
mkdir -p /defaults/fail2ban && \
|
||||
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
|
||||
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
|
||||
echo "**** copy proxy confs to /default ****" && \
|
||||
mkdir -p /defaults/proxy-confs && \
|
||||
curl -o \
|
||||
/tmp/proxy.tar.gz -L \
|
||||
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
|
||||
tar xf \
|
||||
/tmp/proxy.tar.gz -C \
|
||||
/defaults/proxy-confs --strip-components=1 --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
|
||||
echo "**** configure nginx ****" && \
|
||||
rm -f /etc/nginx/conf.d/default.conf && \
|
||||
echo "**** cleanup ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
for cleanfiles in *.pyc *.pyo; \
|
||||
do \
|
||||
find /usr/lib/python3.* -iname "${cleanfiles}" -exec rm -f '{}' + \
|
||||
; done && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/root/.cache \
|
||||
/root/.cargo
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
161
Jenkinsfile
vendored
161
Jenkinsfile
vendored
@@ -56,7 +56,7 @@ pipeline {
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||
env.PULL_REQUEST = env.CHANGE_ID
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml ./root/donate.txt ./.github/workflows/package_trigger.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/external_trigger.yml ./.github/workflows/external_trigger_scheduler.yml'
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml ./root/donate.txt'
|
||||
}
|
||||
script{
|
||||
env.LS_RELEASE_NUMBER = sh(
|
||||
@@ -231,10 +231,53 @@ pipeline {
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
# Stage 1 - Jenkinsfile update
|
||||
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
git add Jenkinsfile
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating Jenkinsfile"
|
||||
rm -Rf ${TEMPDIR}
|
||||
exit 0
|
||||
else
|
||||
echo "Jenkinsfile is up to date."
|
||||
fi
|
||||
# Stage 2 - Delete old templates
|
||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md"
|
||||
for i in ${OLD_TEMPLATES}; do
|
||||
if [[ -f "${i}" ]]; then
|
||||
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||
fi
|
||||
done
|
||||
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
for i in ${TEMPLATES_TO_DELETE}; do
|
||||
git rm "${i}"
|
||||
done
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Deleting old templates"
|
||||
rm -Rf ${TEMPDIR}
|
||||
exit 0
|
||||
else
|
||||
echo "No templates to delete"
|
||||
fi
|
||||
# Stage 3 - Update templates
|
||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]]; then
|
||||
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
@@ -242,11 +285,13 @@ pipeline {
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||
rm -f ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE.md
|
||||
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}/
|
||||
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
|
||||
echo ".jenkins-external" >> .gitignore
|
||||
git add .gitignore
|
||||
fi
|
||||
git add ${TEMPLATED_FILES}
|
||||
git rm .github/ISSUE_TEMPLATE.md || :
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
@@ -255,29 +300,31 @@ pipeline {
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/gitbook
|
||||
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
|
||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
|
||||
cd ${TEMPDIR}/gitbook/docker-documentation/
|
||||
git add images/docker-${CONTAINER_NAME}.md
|
||||
git commit -m 'Bot Updating Documentation'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/unraid
|
||||
mkdir -p ${TEMPDIR}/unraid
|
||||
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
|
||||
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
|
||||
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
|
||||
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml
|
||||
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
|
||||
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
|
||||
fi
|
||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
||||
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
|
||||
cd ${TEMPDIR}/unraid/templates/
|
||||
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
|
||||
echo "Image is on the ignore list, skipping Unraid template upload"
|
||||
echo "Image is on the ignore list, removing Unraid template"
|
||||
git rm unraid/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Removing Deprecated Unraid Template' || :
|
||||
else
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
cd ${TEMPDIR}/unraid/templates/
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add unraid/${CONTAINER_NAME}.xml
|
||||
git commit -m 'Bot Updating Unraid Template'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
|
||||
fi
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
|
||||
fi
|
||||
rm -Rf ${TEMPDIR}'''
|
||||
script{
|
||||
@@ -334,8 +381,21 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-swag/packages\" \
|
||||
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-swag\" \
|
||||
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-swag\" \
|
||||
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Swag\" \
|
||||
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
|
||||
--no-cache --pull -t ${IMAGE}:${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
}
|
||||
}
|
||||
// Build MultiArch Docker containers for push to LS Repo
|
||||
@@ -348,8 +408,21 @@ pipeline {
|
||||
stage('Build X86') {
|
||||
steps {
|
||||
echo "Running on node: ${NODE_NAME}"
|
||||
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-swag/packages\" \
|
||||
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-swag\" \
|
||||
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-swag\" \
|
||||
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Swag\" \
|
||||
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
|
||||
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
}
|
||||
}
|
||||
stage('Build ARMHF') {
|
||||
@@ -362,8 +435,21 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
'''
|
||||
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-swag/packages\" \
|
||||
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-swag\" \
|
||||
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-swag\" \
|
||||
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Swag\" \
|
||||
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
|
||||
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
retry(5) {
|
||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
@@ -383,8 +469,21 @@ pipeline {
|
||||
sh '''#! /bin/bash
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||
'''
|
||||
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker build \
|
||||
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
|
||||
--label \"org.opencontainers.image.authors=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-swag/packages\" \
|
||||
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-swag\" \
|
||||
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-swag\" \
|
||||
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
|
||||
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
|
||||
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
|
||||
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
|
||||
--label \"org.opencontainers.image.title=Swag\" \
|
||||
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
|
||||
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
|
||||
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
|
||||
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
retry(5) {
|
||||
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
|
||||
@@ -512,7 +611,7 @@ pipeline {
|
||||
}
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
docker pull ghcr.io/linuxserver/lsiodev-ci:latest
|
||||
docker pull ghcr.io/linuxserver/ci:latest
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
@@ -537,7 +636,7 @@ pipeline {
|
||||
-e WEB_PATH=\"${CI_WEBPATH}\" \
|
||||
-e DO_REGION="ams3" \
|
||||
-e DO_BUCKET="lsio-ci" \
|
||||
-t ghcr.io/linuxserver/lsiodev-ci:latest \
|
||||
-t ghcr.io/linuxserver/ci:latest \
|
||||
python /ci/ci.py'''
|
||||
}
|
||||
}
|
||||
@@ -682,9 +781,9 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
|
||||
echo "Pushing New tag for current commit ${META_TAG}"
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||
"type": "commit",\
|
||||
@@ -692,9 +791,9 @@ pipeline {
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "master",\
|
||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"name": "'${META_TAG}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**PIP Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||
@@ -720,8 +819,8 @@ pipeline {
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker pull ghcr.io/linuxserver/lsiodev-readme-sync
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker pull ghcr.io/linuxserver/readme-sync
|
||||
docker run --rm=true \
|
||||
-e DOCKERHUB_USERNAME=$DOCKERUSER \
|
||||
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
|
||||
@@ -729,7 +828,7 @@ pipeline {
|
||||
-e DOCKER_REPOSITORY=${IMAGE} \
|
||||
-e GIT_BRANCH=master \
|
||||
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
|
||||
ghcr.io/linuxserver/lsiodev-readme-sync bash -c 'node sync'
|
||||
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
|
||||
rm -Rf ${TEMPDIR} '''
|
||||
}
|
||||
}
|
||||
|
||||
296
README.md
296
README.md
@@ -1,5 +1,5 @@
|
||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read the CONTRIBUTING.md -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-swag/blob/master/.github/CONTRIBUTING.md -->
|
||||
|
||||
[](https://linuxserver.io)
|
||||
|
||||
@@ -12,13 +12,14 @@
|
||||
|
||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
|
||||
|
||||
* regular and timely application updates
|
||||
* easy user mappings (PGID, PUID)
|
||||
* custom base image with s6 overlay
|
||||
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
|
||||
* regular security updates
|
||||
* regular and timely application updates
|
||||
* easy user mappings (PGID, PUID)
|
||||
* custom base image with s6 overlay
|
||||
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
|
||||
* regular security updates
|
||||
|
||||
Find us at:
|
||||
|
||||
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
|
||||
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
|
||||
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
|
||||
@@ -56,134 +57,6 @@ The architectures supported by this image are:
|
||||
| arm64 | arm64v8-latest |
|
||||
| armhf | arm32v7-latest |
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Here are some example snippets to help you get started creating a container.
|
||||
|
||||
### docker-compose ([recommended](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
Compatible with docker-compose v2 schemas.
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "2.1"
|
||||
services:
|
||||
swag:
|
||||
image: ghcr.io/linuxserver/swag
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/London
|
||||
- URL=yourdomain.url
|
||||
- SUBDOMAINS=www,
|
||||
- VALIDATION=http
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN=cloudflare #optional
|
||||
- PROPAGATION= #optional
|
||||
- DUCKDNSTOKEN= #optional
|
||||
- EMAIL= #optional
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS= #optional
|
||||
- STAGING=false #optional
|
||||
- MAXMINDDB_LICENSE_KEY= #optional
|
||||
volumes:
|
||||
- /path/to/appdata/config:/config
|
||||
ports:
|
||||
- 443:443
|
||||
- 80:80 #optional
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### docker cli
|
||||
|
||||
```
|
||||
docker run -d \
|
||||
--name=swag \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-e URL=yourdomain.url \
|
||||
-e SUBDOMAINS=www, \
|
||||
-e VALIDATION=http \
|
||||
-e CERTPROVIDER= `#optional` \
|
||||
-e DNSPLUGIN=cloudflare `#optional` \
|
||||
-e PROPAGATION= `#optional` \
|
||||
-e DUCKDNSTOKEN= `#optional` \
|
||||
-e EMAIL= `#optional` \
|
||||
-e ONLY_SUBDOMAINS=false `#optional` \
|
||||
-e EXTRA_DOMAINS= `#optional` \
|
||||
-e STAGING=false `#optional` \
|
||||
-e MAXMINDDB_LICENSE_KEY= `#optional` \
|
||||
-p 443:443 \
|
||||
-p 80:80 `#optional` \
|
||||
-v /path/to/appdata/config:/config \
|
||||
--restart unless-stopped \
|
||||
ghcr.io/linuxserver/swag
|
||||
```
|
||||
|
||||
|
||||
## Parameters
|
||||
|
||||
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
|
||||
|
||||
| Parameter | Function |
|
||||
| :----: | --- |
|
||||
| `-p 443` | Https port |
|
||||
| `-p 80` | Http port (required for http validation and http -> https redirect) |
|
||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
|
||||
| `-e URL=yourdomain.url` | Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). |
|
||||
| `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) |
|
||||
| `-e VALIDATION=http` | Certbot validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
|
||||
| `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. |
|
||||
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `inwx`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
|
||||
| `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. |
|
||||
| `-e DUCKDNSTOKEN=` | Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org |
|
||||
| `-e EMAIL=` | Optional e-mail address used for cert expiration notifications (Required for ZeroSSL). |
|
||||
| `-e ONLY_SUBDOMAINS=false` | If you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to `true` |
|
||||
| `-e EXTRA_DOMAINS=` | Additional fully qualified domain names (comma separated, no spaces) ie. `extradomain.com,subdomain.anotherdomain.org,*.anotherdomain.org` |
|
||||
| `-e STAGING=false` | Set to `true` to retrieve certs in staging mode. Rate limits will be much higher, but the resulting cert will not pass the browser's security test. Only to be used for testing purposes. |
|
||||
| `-e MAXMINDDB_LICENSE_KEY=` | Add your MaxmindDB license key to automatically download the GeoLite2-City.mmdb database. Download location is /config/geoip2db. The database is updated weekly. |
|
||||
| `-v /config` | All the config files including the webroot reside here. |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
You can set any environment variable from a file by using a special prepend `FILE__`.
|
||||
|
||||
As an example:
|
||||
|
||||
```
|
||||
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||||
```
|
||||
|
||||
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
||||
|
||||
## Umask for running applications
|
||||
|
||||
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
|
||||
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
|
||||
|
||||
## User / Group Identifiers
|
||||
|
||||
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
|
||||
|
||||
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
|
||||
|
||||
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
|
||||
|
||||
```
|
||||
$ id username
|
||||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Application Setup
|
||||
|
||||
> ### Migrating from the old `linuxserver/letsencrypt` image
|
||||
@@ -209,7 +82,7 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
|
||||
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from Let's Encrypt in those circumstances.
|
||||
### Security and password protection
|
||||
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
|
||||
* The container provides a pre-generated 4096-bit dhparams.pem (rotated weekly via [Jenkins job](https://ci.linuxserver.io/blue/organizations/jenkins/Xtras-Builders-Etc%2Fdhparams-uploader/activity)) for new instances, however you may generate your own by running `docker exec swag openssl dhparam -out /config/nginx/dhparams.pem 4096` WARNING: This takes a very long time
|
||||
* Per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919), the container is shipping [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) as the `dhparams.pem`.
|
||||
* If you'd like to password protect your sites, you can use htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it swag htpasswd -c /config/nginx/.htpasswd <username>`
|
||||
* You can add multiple user:pass to `.htpasswd`. For the first user, use the above command, for others, use the above command without the `-c` flag, as it will force deletion of the existing `.htpasswd` and creation of a new one
|
||||
* You can also use ldap auth for security and access control. A sample, user configurable ldap.conf is provided, and it requires the separate image [linuxserver/ldap-auth](https://hub.docker.com/r/linuxserver/ldap-auth/) to communicate with an ldap server.
|
||||
@@ -254,13 +127,136 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
* Proxy sample files WILL be updated, however your renamed (enabled) proxy files will not.
|
||||
* You can check the new sample and adjust your active config as needed.
|
||||
|
||||
## Usage
|
||||
|
||||
Here are some example snippets to help you get started creating a container.
|
||||
|
||||
### docker-compose ([recommended](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
Compatible with docker-compose v2 schemas.
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "2.1"
|
||||
services:
|
||||
swag:
|
||||
image: ghcr.io/linuxserver/swag
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/London
|
||||
- URL=yourdomain.url
|
||||
- SUBDOMAINS=www,
|
||||
- VALIDATION=http
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN=cloudflare #optional
|
||||
- PROPAGATION= #optional
|
||||
- DUCKDNSTOKEN= #optional
|
||||
- EMAIL= #optional
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS= #optional
|
||||
- STAGING=false #optional
|
||||
- MAXMINDDB_LICENSE_KEY= #optional
|
||||
volumes:
|
||||
- /path/to/appdata/config:/config
|
||||
ports:
|
||||
- 443:443
|
||||
- 80:80 #optional
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### docker cli
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name=swag \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-e URL=yourdomain.url \
|
||||
-e SUBDOMAINS=www, \
|
||||
-e VALIDATION=http \
|
||||
-e CERTPROVIDER= `#optional` \
|
||||
-e DNSPLUGIN=cloudflare `#optional` \
|
||||
-e PROPAGATION= `#optional` \
|
||||
-e DUCKDNSTOKEN= `#optional` \
|
||||
-e EMAIL= `#optional` \
|
||||
-e ONLY_SUBDOMAINS=false `#optional` \
|
||||
-e EXTRA_DOMAINS= `#optional` \
|
||||
-e STAGING=false `#optional` \
|
||||
-e MAXMINDDB_LICENSE_KEY= `#optional` \
|
||||
-p 443:443 \
|
||||
-p 80:80 `#optional` \
|
||||
-v /path/to/appdata/config:/config \
|
||||
--restart unless-stopped \
|
||||
ghcr.io/linuxserver/swag
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
|
||||
|
||||
| Parameter | Function |
|
||||
| :----: | --- |
|
||||
| `-p 443` | Https port |
|
||||
| `-p 80` | Http port (required for http validation and http -> https redirect) |
|
||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
|
||||
| `-e URL=yourdomain.url` | Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). |
|
||||
| `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) |
|
||||
| `-e VALIDATION=http` | Certbot validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
|
||||
| `-e CERTPROVIDER=` | Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt. |
|
||||
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
|
||||
| `-e PROPAGATION=` | Optionally override (in seconds) the default propagation time for the dns plugins. |
|
||||
| `-e DUCKDNSTOKEN=` | Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org |
|
||||
| `-e EMAIL=` | Optional e-mail address used for cert expiration notifications (Required for ZeroSSL). |
|
||||
| `-e ONLY_SUBDOMAINS=false` | If you wish to get certs only for certain subdomains, but not the main domain (main domain may be hosted on another machine and cannot be validated), set this to `true` |
|
||||
| `-e EXTRA_DOMAINS=` | Additional fully qualified domain names (comma separated, no spaces) ie. `extradomain.com,subdomain.anotherdomain.org,*.anotherdomain.org` |
|
||||
| `-e STAGING=false` | Set to `true` to retrieve certs in staging mode. Rate limits will be much higher, but the resulting cert will not pass the browser's security test. Only to be used for testing purposes. |
|
||||
| `-e MAXMINDDB_LICENSE_KEY=` | Add your MaxmindDB license key to automatically download the GeoLite2-City.mmdb database. Download location is /config/geoip2db. The database is updated weekly. |
|
||||
| `-v /config` | All the config files including the webroot reside here. |
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
You can set any environment variable from a file by using a special prepend `FILE__`.
|
||||
|
||||
As an example:
|
||||
|
||||
```bash
|
||||
-e FILE__PASSWORD=/run/secrets/mysecretpassword
|
||||
```
|
||||
|
||||
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
|
||||
|
||||
## Umask for running applications
|
||||
|
||||
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
|
||||
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.
|
||||
|
||||
## User / Group Identifiers
|
||||
|
||||
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
|
||||
|
||||
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
|
||||
|
||||
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
|
||||
|
||||
```bash
|
||||
$ id username
|
||||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
|
||||
```
|
||||
|
||||
## Docker Mods
|
||||
|
||||
[](https://mods.linuxserver.io/?mod=swag "view available mods for this container.") [](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
|
||||
|
||||
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
|
||||
|
||||
|
||||
## Support Info
|
||||
|
||||
* Shell access whilst the container is running: `docker exec -it swag /bin/bash`
|
||||
@@ -277,6 +273,7 @@ Most of our images are static, versioned, and require an image update and contai
|
||||
Below are the instructions for updating containers:
|
||||
|
||||
### Via Docker Compose
|
||||
|
||||
* Update all images: `docker-compose pull`
|
||||
* or update a single image: `docker-compose pull swag`
|
||||
* Let compose update all containers as necessary: `docker-compose up -d`
|
||||
@@ -284,6 +281,7 @@ Below are the instructions for updating containers:
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Docker Run
|
||||
|
||||
* Update the image: `docker pull ghcr.io/linuxserver/swag`
|
||||
* Stop the running container: `docker stop swag`
|
||||
* Delete the container: `docker rm swag`
|
||||
@@ -291,24 +289,29 @@ Below are the instructions for updating containers:
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
|
||||
|
||||
* Pull the latest image at its tag and replace it with the same env variables in one run:
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
containrrr/watchtower \
|
||||
--run-once swag
|
||||
```
|
||||
|
||||
* You can also remove the old dangling images: `docker image prune`
|
||||
|
||||
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
|
||||
|
||||
### Image Update Notifications - Diun (Docker Image Update Notifier)
|
||||
|
||||
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
|
||||
|
||||
## Building locally
|
||||
|
||||
If you want to make local modifications to these images for development purposes or just to customize the logic:
|
||||
```
|
||||
|
||||
```bash
|
||||
git clone https://github.com/linuxserver/docker-swag.git
|
||||
cd docker-swag
|
||||
docker build \
|
||||
@@ -318,7 +321,8 @@ docker build \
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
```
|
||||
|
||||
@@ -326,7 +330,19 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **08.01.21:** - Add support for getting certs from [ZeroSSL](https://zerossl.com/) via optional `CERTPROVIDER` env var. Update aliyun, domeneshop, inxw and transip dns plugins with the new plugin names. Hide `donoteditthisfile.conf` because users were editing it despite its name. Suppress harmless error when no proxy confs are enabled.
|
||||
* **28.05.21:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-server.conf - Use `resolver.conf` and patch for `CVE-2021-32637`.
|
||||
* **20.05.21:** - Modify resolver.conf generation to detect and ignore ipv6.
|
||||
* **14.05.21:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, ssl.conf, proxy.conf, and the default site-conf - Rework nginx.conf to be inline with alpine upstream and relocate lines from other files. Use linuxserver.io wheel index for pip packages. Switch to using [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) for `dhparams.pem` per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919). Added `worker_processes.conf`, which sets the number of nginx workers, and `resolver.conf`, which sets the dns resolver. Both conf files are auto-generated only on first start and can be user modified later.
|
||||
* **21.04.21:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-server.conf and authelia-location.conf - Add remote name/email headers and pass http method.
|
||||
* **12.04.21:** - Add php7-gmp and php7-pecl-mailparse.
|
||||
* **12.04.21:** - Add support for vultr dns validation.
|
||||
* **14.03.21:** - Add support for directadmin dns validation.
|
||||
* **12.02.21:** - Clean up rust/cargo cache, which ballooned the image size in the last couple of builds.
|
||||
* **10.02.21:** - Fix aliyun, domeneshop, inwx and transip dns confs for existing users.
|
||||
* **09.02.21:** - Rebasing to alpine 3.13. Add nginx mods brotli and dav-ext. Remove nginx mods lua and lua-upstream (due to regression over the last couple of years).
|
||||
* **26.01.21:** - Add support for hetzner dns validation.
|
||||
* **20.01.21:** - Add check for ZeroSSL EAB retrieval.
|
||||
* **08.01.21:** - Add support for getting certs from [ZeroSSL](https://zerossl.com/) via optional `CERTPROVIDER` env var. Update aliyun, domeneshop, inwx and transip dns plugins with the new plugin names. Hide `donoteditthisfile.conf` because users were editing it despite its name. Suppress harmless error when no proxy confs are enabled.
|
||||
* **03.01.21:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) /config/nginx/site-confs/default - Add helper pages to aid troubleshooting
|
||||
* **10.12.20:** - Add support for njalla dns validation
|
||||
* **09.12.20:** - Check for template/conf updates and notify in the log. Add support for gehirn and sakuracloud dns validation.
|
||||
|
||||
@@ -1,220 +1,225 @@
|
||||
alpine-baselayout-3.2.0-r7
|
||||
alpine-baselayout-3.2.0-r8
|
||||
alpine-keys-2.2-r0
|
||||
apache2-utils-2.4.46-r1
|
||||
apk-tools-2.10.5-r1
|
||||
apache2-utils-2.4.46-r3
|
||||
apk-tools-2.12.5-r0
|
||||
apr-1.7.0-r0
|
||||
apr-util-1.6.1-r6
|
||||
apr-util-1.6.1-r7
|
||||
argon2-libs-20190702-r1
|
||||
bash-5.0.17-r0
|
||||
brotli-libs-1.0.9-r1
|
||||
busybox-1.31.1-r19
|
||||
bash-5.1.0-r0
|
||||
brotli-libs-1.0.9-r3
|
||||
busybox-1.32.1-r6
|
||||
c-client-2007f-r11
|
||||
ca-certificates-20191127-r4
|
||||
ca-certificates-bundle-20191127-r4
|
||||
coreutils-8.32-r0
|
||||
curl-7.69.1-r3
|
||||
db-5.3.28-r1
|
||||
expat-2.2.9-r1
|
||||
fail2ban-0.11.1-r3
|
||||
freetype-2.10.4-r0
|
||||
gdbm-1.13-r1
|
||||
git-2.26.2-r0
|
||||
git-perl-2.26.2-r0
|
||||
glib-2.64.6-r0
|
||||
gmp-6.2.0-r0
|
||||
gnupg-2.2.23-r0
|
||||
gnutls-3.6.15-r0
|
||||
icu-libs-67.1-r0
|
||||
ip6tables-1.8.4-r2
|
||||
iptables-1.8.4-r2
|
||||
ca-certificates-20191127-r5
|
||||
ca-certificates-bundle-20191127-r5
|
||||
coreutils-8.32-r2
|
||||
curl-7.77.0-r0
|
||||
expat-2.2.10-r1
|
||||
fail2ban-0.11.1-r4
|
||||
freetype-2.10.4-r1
|
||||
gdbm-1.19-r0
|
||||
git-2.30.2-r0
|
||||
git-perl-2.30.2-r0
|
||||
glib-2.66.8-r0
|
||||
gmp-6.2.1-r0
|
||||
gnupg-2.2.27-r0
|
||||
gnutls-3.7.1-r0
|
||||
icu-libs-67.1-r2
|
||||
ip6tables-1.8.6-r0
|
||||
iptables-1.8.6-r0
|
||||
libacl-2.2.53-r0
|
||||
libassuan-2.5.3-r0
|
||||
libassuan-2.5.4-r0
|
||||
libattr-2.4.48-r0
|
||||
libblkid-2.35.2-r0
|
||||
libblkid-2.36.1-r1
|
||||
libbsd-0.10.0-r0
|
||||
libbz2-1.0.8-r1
|
||||
libc-utils-0.7.2-r3
|
||||
libcap-2.27-r0
|
||||
libcrypto1.1-1.1.1i-r0
|
||||
libcurl-7.69.1-r3
|
||||
libedit-20191231.3.1-r0
|
||||
libevent-2.1.11-r1
|
||||
libcap-2.46-r0
|
||||
libcrypto1.1-1.1.1k-r0
|
||||
libcurl-7.77.0-r0
|
||||
libedit-20191231.3.1-r1
|
||||
libevent-2.1.12-r1
|
||||
libffi-3.3-r2
|
||||
libgcc-9.3.0-r2
|
||||
libgcrypt-1.8.5-r0
|
||||
libgd-2.3.0-r1
|
||||
libgpg-error-1.37-r0
|
||||
libgcc-10.2.1_pre1-r3
|
||||
libgcrypt-1.8.7-r0
|
||||
libgd-2.3.0-r2
|
||||
libgpg-error-1.41-r0
|
||||
libice-1.0.10-r0
|
||||
libidn-1.35-r0
|
||||
libintl-0.20.2-r0
|
||||
libjpeg-turbo-2.0.5-r0
|
||||
libksba-1.4.0-r0
|
||||
libldap-2.4.50-r1
|
||||
libmagic-5.38-r0
|
||||
libmaxminddb-1.4.3-r0
|
||||
libmcrypt-2.5.8-r8
|
||||
libintl-0.20.2-r2
|
||||
libjpeg-turbo-2.1.0-r0
|
||||
libksba-1.5.0-r0
|
||||
libldap-2.4.57-r1
|
||||
libmagic-5.39-r0
|
||||
libmaxminddb-1.5.0-r1
|
||||
libmcrypt-2.5.8-r9
|
||||
libmemcached-libs-1.0.18-r4
|
||||
libmnl-1.0.4-r0
|
||||
libmount-2.35.2-r0
|
||||
libnftnl-libs-1.1.6-r0
|
||||
libmnl-1.0.4-r1
|
||||
libmount-2.36.1-r1
|
||||
libnftnl-libs-1.1.8-r0
|
||||
libpng-1.6.37-r1
|
||||
libpq-12.5-r0
|
||||
libpq-13.3-r0
|
||||
libproc-3.3.16-r0
|
||||
libressl3.1-libcrypto-3.1.2-r0
|
||||
libressl3.1-libssl-3.1.2-r0
|
||||
libsasl-2.1.27-r6
|
||||
libseccomp-2.4.3-r0
|
||||
libsecret-0.20.3-r0
|
||||
libressl3.1-libcrypto-3.1.5-r0
|
||||
libressl3.1-libssl-3.1.5-r0
|
||||
libsasl-2.1.27-r10
|
||||
libseccomp-2.5.1-r1
|
||||
libsecret-0.20.4-r0
|
||||
libsm-1.2.3-r0
|
||||
libsodium-1.0.18-r0
|
||||
libssl1.1-1.1.1i-r0
|
||||
libstdc++-9.3.0-r2
|
||||
libssl1.1-1.1.1k-r0
|
||||
libstdc++-10.2.1_pre1-r3
|
||||
libtasn1-4.16.0-r1
|
||||
libtls-standalone-2.9.1-r1
|
||||
libunistring-0.9.10-r0
|
||||
libuuid-2.35.2-r0
|
||||
libuuid-2.36.1-r1
|
||||
libwebp-1.1.0-r0
|
||||
libx11-1.6.12-r0
|
||||
libx11-1.7.1-r0
|
||||
libxau-1.0.9-r0
|
||||
libxcb-1.14-r1
|
||||
libxdmcp-1.1.3-r0
|
||||
libxext-1.3.4-r0
|
||||
libxml2-2.9.10-r5
|
||||
libxml2-2.9.10-r7
|
||||
libxpm-3.5.13-r0
|
||||
libxslt-1.1.34-r0
|
||||
libxt-1.2.0-r0
|
||||
libzip-1.6.1-r1
|
||||
linux-pam-1.3.1-r4
|
||||
logrotate-3.16.0-r0
|
||||
luajit-5.1.20190925-r0
|
||||
memcached-1.6.6-r0
|
||||
musl-1.1.24-r10
|
||||
musl-utils-1.1.24-r10
|
||||
nano-4.9.3-r0
|
||||
ncurses-libs-6.2_p20200523-r0
|
||||
ncurses-terminfo-base-6.2_p20200523-r0
|
||||
nettle-3.5.1-r1
|
||||
nghttp2-libs-1.41.0-r0
|
||||
nginx-1.18.0-r1
|
||||
nginx-mod-devel-kit-1.18.0-r1
|
||||
nginx-mod-http-echo-1.18.0-r1
|
||||
nginx-mod-http-fancyindex-1.18.0-r1
|
||||
nginx-mod-http-geoip2-1.18.0-r1
|
||||
nginx-mod-http-headers-more-1.18.0-r1
|
||||
nginx-mod-http-image-filter-1.18.0-r1
|
||||
nginx-mod-http-lua-1.18.0-r1
|
||||
nginx-mod-http-lua-upstream-1.18.0-r1
|
||||
nginx-mod-http-nchan-1.18.0-r1
|
||||
nginx-mod-http-perl-1.18.0-r1
|
||||
nginx-mod-http-redis2-1.18.0-r1
|
||||
nginx-mod-http-set-misc-1.18.0-r1
|
||||
nginx-mod-http-upload-progress-1.18.0-r1
|
||||
nginx-mod-http-xslt-filter-1.18.0-r1
|
||||
nginx-mod-mail-1.18.0-r1
|
||||
nginx-mod-rtmp-1.18.0-r1
|
||||
nginx-mod-stream-1.18.0-r1
|
||||
nginx-mod-stream-geoip2-1.18.0-r1
|
||||
nginx-vim-1.18.0-r1
|
||||
libxt-1.2.1-r0
|
||||
libzip-1.7.3-r2
|
||||
linux-pam-1.5.1-r0
|
||||
logrotate-3.18.0-r0
|
||||
lz4-libs-1.9.2-r0
|
||||
memcached-1.6.9-r0
|
||||
musl-1.2.2-r1
|
||||
musl-utils-1.2.2-r0
|
||||
nano-5.4-r1
|
||||
ncurses-libs-6.2_p20210109-r0
|
||||
ncurses-terminfo-base-6.2_p20210109-r0
|
||||
nettle-3.7.2-r0
|
||||
nghttp2-libs-1.42.0-r1
|
||||
nginx-1.18.0-r15
|
||||
nginx-mod-devel-kit-1.18.0-r15
|
||||
nginx-mod-http-brotli-1.18.0-r15
|
||||
nginx-mod-http-dav-ext-1.18.0-r15
|
||||
nginx-mod-http-echo-1.18.0-r15
|
||||
nginx-mod-http-fancyindex-1.18.0-r15
|
||||
nginx-mod-http-geoip2-1.18.0-r15
|
||||
nginx-mod-http-headers-more-1.18.0-r15
|
||||
nginx-mod-http-image-filter-1.18.0-r15
|
||||
nginx-mod-http-nchan-1.18.0-r15
|
||||
nginx-mod-http-perl-1.18.0-r15
|
||||
nginx-mod-http-redis2-1.18.0-r15
|
||||
nginx-mod-http-set-misc-1.18.0-r15
|
||||
nginx-mod-http-upload-progress-1.18.0-r15
|
||||
nginx-mod-http-xslt-filter-1.18.0-r15
|
||||
nginx-mod-mail-1.18.0-r15
|
||||
nginx-mod-rtmp-1.18.0-r15
|
||||
nginx-mod-stream-1.18.0-r15
|
||||
nginx-mod-stream-geoip2-1.18.0-r15
|
||||
nginx-vim-1.18.0-r15
|
||||
npth-1.6-r0
|
||||
openssl-1.1.1i-r0
|
||||
oniguruma-6.9.6-r0
|
||||
openssl-1.1.1k-r0
|
||||
p11-kit-0.23.22-r0
|
||||
pcre-8.44-r0
|
||||
pcre2-10.35-r0
|
||||
perl-5.30.3-r0
|
||||
perl-error-0.17029-r0
|
||||
perl-git-2.26.2-r0
|
||||
php7-7.3.26-r0
|
||||
php7-bcmath-7.3.26-r0
|
||||
php7-bz2-7.3.26-r0
|
||||
php7-common-7.3.26-r0
|
||||
php7-ctype-7.3.26-r0
|
||||
php7-curl-7.3.26-r0
|
||||
php7-dom-7.3.26-r0
|
||||
php7-exif-7.3.26-r0
|
||||
php7-fileinfo-7.3.26-r0
|
||||
php7-fpm-7.3.26-r0
|
||||
php7-ftp-7.3.26-r0
|
||||
php7-gd-7.3.26-r0
|
||||
php7-iconv-7.3.26-r0
|
||||
php7-imap-7.3.26-r0
|
||||
php7-intl-7.3.26-r0
|
||||
php7-json-7.3.26-r0
|
||||
php7-ldap-7.3.26-r0
|
||||
php7-mbstring-7.3.26-r0
|
||||
php7-mysqli-7.3.26-r0
|
||||
php7-mysqlnd-7.3.26-r0
|
||||
php7-opcache-7.3.26-r0
|
||||
php7-openssl-7.3.26-r0
|
||||
php7-pdo-7.3.26-r0
|
||||
php7-pdo_mysql-7.3.26-r0
|
||||
php7-pdo_odbc-7.3.26-r0
|
||||
php7-pdo_pgsql-7.3.26-r0
|
||||
php7-pdo_sqlite-7.3.26-r0
|
||||
php7-pear-7.3.26-r0
|
||||
php7-pecl-apcu-5.1.19-r0
|
||||
php7-pecl-igbinary-3.1.6-r0
|
||||
php7-pecl-mcrypt-1.0.3-r0
|
||||
php7-pecl-memcached-3.1.5-r0
|
||||
php7-pecl-redis-5.2.2-r1
|
||||
php7-pgsql-7.3.26-r0
|
||||
php7-phar-7.3.26-r0
|
||||
php7-posix-7.3.26-r0
|
||||
php7-session-7.3.26-r0
|
||||
php7-simplexml-7.3.26-r0
|
||||
php7-soap-7.3.26-r0
|
||||
php7-sockets-7.3.26-r0
|
||||
php7-sodium-7.3.26-r0
|
||||
php7-sqlite3-7.3.26-r0
|
||||
php7-tokenizer-7.3.26-r0
|
||||
php7-xml-7.3.26-r0
|
||||
php7-xmlreader-7.3.26-r0
|
||||
php7-xmlrpc-7.3.26-r0
|
||||
php7-xmlwriter-7.3.26-r0
|
||||
php7-xsl-7.3.26-r0
|
||||
php7-zip-7.3.26-r0
|
||||
pinentry-1.1.0-r2
|
||||
popt-1.16-r7
|
||||
pcre2-10.36-r0
|
||||
perl-5.32.0-r0
|
||||
perl-error-0.17029-r1
|
||||
perl-git-2.30.2-r0
|
||||
php7-7.4.19-r0
|
||||
php7-bcmath-7.4.19-r0
|
||||
php7-bz2-7.4.19-r0
|
||||
php7-common-7.4.19-r0
|
||||
php7-ctype-7.4.19-r0
|
||||
php7-curl-7.4.19-r0
|
||||
php7-dom-7.4.19-r0
|
||||
php7-exif-7.4.19-r0
|
||||
php7-fileinfo-7.4.19-r0
|
||||
php7-fpm-7.4.19-r0
|
||||
php7-ftp-7.4.19-r0
|
||||
php7-gd-7.4.19-r0
|
||||
php7-gmp-7.4.19-r0
|
||||
php7-iconv-7.4.19-r0
|
||||
php7-imap-7.4.19-r0
|
||||
php7-intl-7.4.19-r0
|
||||
php7-json-7.4.19-r0
|
||||
php7-ldap-7.4.19-r0
|
||||
php7-mbstring-7.4.19-r0
|
||||
php7-mysqli-7.4.19-r0
|
||||
php7-mysqlnd-7.4.19-r0
|
||||
php7-opcache-7.4.19-r0
|
||||
php7-openssl-7.4.19-r0
|
||||
php7-pdo-7.4.19-r0
|
||||
php7-pdo_mysql-7.4.19-r0
|
||||
php7-pdo_odbc-7.4.19-r0
|
||||
php7-pdo_pgsql-7.4.19-r0
|
||||
php7-pdo_sqlite-7.4.19-r0
|
||||
php7-pear-7.4.19-r0
|
||||
php7-pecl-apcu-5.1.20-r0
|
||||
php7-pecl-igbinary-3.2.2-r0
|
||||
php7-pecl-mailparse-3.1.1-r1
|
||||
php7-pecl-mcrypt-1.0.4-r0
|
||||
php7-pecl-memcached-3.1.5-r2
|
||||
php7-pecl-redis-5.3.4-r0
|
||||
php7-pgsql-7.4.19-r0
|
||||
php7-phar-7.4.19-r0
|
||||
php7-posix-7.4.19-r0
|
||||
php7-session-7.4.19-r0
|
||||
php7-simplexml-7.4.19-r0
|
||||
php7-soap-7.4.19-r0
|
||||
php7-sockets-7.4.19-r0
|
||||
php7-sodium-7.4.19-r0
|
||||
php7-sqlite3-7.4.19-r0
|
||||
php7-tokenizer-7.4.19-r0
|
||||
php7-xml-7.4.19-r0
|
||||
php7-xmlreader-7.4.19-r0
|
||||
php7-xmlrpc-7.4.19-r0
|
||||
php7-xmlwriter-7.4.19-r0
|
||||
php7-xsl-7.4.19-r0
|
||||
php7-zip-7.4.19-r0
|
||||
pinentry-1.1.1-r0
|
||||
popt-1.18-r0
|
||||
procps-3.3.16-r0
|
||||
py3-appdirs-1.4.4-r1
|
||||
py3-asn1crypto-1.3.0-r0
|
||||
py3-asn1crypto-1.4.0-r0
|
||||
py3-cachecontrol-0.12.6-r0
|
||||
py3-certifi-2020.4.5.1-r0
|
||||
py3-cffi-1.14.0-r2
|
||||
py3-chardet-3.0.4-r4
|
||||
py3-colorama-0.4.3-r0
|
||||
py3-cffi-1.14.4-r0
|
||||
py3-chardet-4.0.0-r0
|
||||
py3-colorama-0.4.4-r0
|
||||
py3-contextlib2-0.6.0-r0
|
||||
py3-cparser-2.20-r0
|
||||
py3-cryptography-2.9.2-r0
|
||||
py3-distlib-0.3.0-r0
|
||||
py3-cryptography-3.3.2-r0
|
||||
py3-distlib-0.3.1-r1
|
||||
py3-distro-1.5.0-r1
|
||||
py3-future-0.18.2-r1
|
||||
py3-html5lib-1.0.1-r4
|
||||
py3-idna-2.9-r0
|
||||
py3-html5lib-1.1-r0
|
||||
py3-idna-3.1-r0
|
||||
py3-lockfile-0.12.2-r3
|
||||
py3-msgpack-1.0.0-r0
|
||||
py3-ordered-set-4.0.1-r0
|
||||
py3-packaging-20.4-r0
|
||||
py3-parsing-2.4.7-r0
|
||||
py3-pep517-0.8.2-r0
|
||||
py3-pip-20.1.1-r0
|
||||
py3-msgpack-1.0.2-r0
|
||||
py3-ordered-set-4.0.2-r0
|
||||
py3-packaging-20.9-r0
|
||||
py3-parsing-2.4.7-r1
|
||||
py3-pep517-0.9.1-r0
|
||||
py3-pip-20.3.4-r0
|
||||
py3-progress-1.5-r0
|
||||
py3-pytoml-0.1.21-r0
|
||||
py3-requests-2.23.0-r0
|
||||
py3-requests-2.25.1-r1
|
||||
py3-retrying-1.3.3-r0
|
||||
py3-setuptools-47.0.0-r0
|
||||
py3-setuptools-51.3.3-r0
|
||||
py3-six-1.15.0-r0
|
||||
py3-toml-0.10.1-r0
|
||||
py3-urllib3-1.25.9-r0
|
||||
py3-toml-0.10.2-r0
|
||||
py3-urllib3-1.26.2-r1
|
||||
py3-webencodings-0.5.1-r3
|
||||
python3-3.8.5-r0
|
||||
readline-8.0.4-r0
|
||||
scanelf-1.2.6-r0
|
||||
python3-3.8.10-r0
|
||||
readline-8.1.0-r0
|
||||
s6-ipcserver-2.10.0.0-r0
|
||||
scanelf-1.2.8-r0
|
||||
shadow-4.8.1-r0
|
||||
sqlite-libs-3.32.1-r0
|
||||
ssl_client-1.31.1-r19
|
||||
tzdata-2020c-r1
|
||||
unixodbc-2.3.7-r2
|
||||
whois-5.5.6-r0
|
||||
skalibs-2.10.0.0-r0
|
||||
sqlite-libs-3.34.1-r0
|
||||
ssl_client-1.32.1-r6
|
||||
tzdata-2021a-r0
|
||||
unixodbc-2.3.9-r1
|
||||
utmps-0.1.0.0-r0
|
||||
whois-5.5.7-r1
|
||||
xz-5.2.5-r0
|
||||
xz-libs-5.2.5-r0
|
||||
zlib-1.2.11-r3
|
||||
zstd-libs-1.4.5-r3
|
||||
|
||||
@@ -51,7 +51,7 @@ cap_add_param_vars:
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "CERTPROVIDER", env_value: "", desc: "Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt." }
|
||||
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `inwx`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
|
||||
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
|
||||
- { env_var: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." }
|
||||
- { env_var: "DUCKDNSTOKEN", env_value: "", desc: "Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org" }
|
||||
- { env_var: "EMAIL", env_value: "", desc: "Optional e-mail address used for cert expiration notifications (Required for ZeroSSL)." }
|
||||
@@ -101,7 +101,7 @@ app_setup_block: |
|
||||
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from Let's Encrypt in those circumstances.
|
||||
### Security and password protection
|
||||
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
|
||||
* The container provides a pre-generated 4096-bit dhparams.pem (rotated weekly via [Jenkins job](https://ci.linuxserver.io/blue/organizations/jenkins/Xtras-Builders-Etc%2Fdhparams-uploader/activity)) for new instances, however you may generate your own by running `docker exec swag openssl dhparam -out /config/nginx/dhparams.pem 4096` WARNING: This takes a very long time
|
||||
* Per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919), the container is shipping [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) as the `dhparams.pem`.
|
||||
* If you'd like to password protect your sites, you can use htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it swag htpasswd -c /config/nginx/.htpasswd <username>`
|
||||
* You can add multiple user:pass to `.htpasswd`. For the first user, use the above command, for others, use the above command without the `-c` flag, as it will force deletion of the existing `.htpasswd` and creation of a new one
|
||||
* You can also use ldap auth for security and access control. A sample, user configurable ldap.conf is provided, and it requires the separate image [linuxserver/ldap-auth](https://hub.docker.com/r/linuxserver/ldap-auth/) to communicate with an ldap server.
|
||||
@@ -151,7 +151,19 @@ app_setup_nginx_reverse_proxy_block: ""
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "08.01.21:", desc: "Add support for getting certs from [ZeroSSL](https://zerossl.com/) via optional `CERTPROVIDER` env var. Update aliyun, domeneshop, inxw and transip dns plugins with the new plugin names. Hide `donoteditthisfile.conf` because users were editing it despite its name. Suppress harmless error when no proxy confs are enabled." }
|
||||
- { date: "28.05.21:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-server.conf - Use `resolver.conf` and patch for `CVE-2021-32637`." }
|
||||
- { date: "20.05.21:", desc: "Modify resolver.conf generation to detect and ignore ipv6." }
|
||||
- { date: "14.05.21:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, ssl.conf, proxy.conf, and the default site-conf - Rework nginx.conf to be inline with alpine upstream and relocate lines from other files. Use linuxserver.io wheel index for pip packages. Switch to using [ffdhe4096](https://ssl-config.mozilla.org/ffdhe4096.txt) for `dhparams.pem` per [RFC7919](https://datatracker.ietf.org/doc/html/rfc7919). Added `worker_processes.conf`, which sets the number of nginx workers, and `resolver.conf`, which sets the dns resolver. Both conf files are auto-generated only on first start and can be user modified later." }
|
||||
- { date: "21.04.21:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-server.conf and authelia-location.conf - Add remote name/email headers and pass http method." }
|
||||
- { date: "12.04.21:", desc: "Add php7-gmp and php7-pecl-mailparse." }
|
||||
- { date: "12.04.21:", desc: "Add support for vultr dns validation." }
|
||||
- { date: "14.03.21:", desc: "Add support for directadmin dns validation." }
|
||||
- { date: "12.02.21:", desc: "Clean up rust/cargo cache, which ballooned the image size in the last couple of builds." }
|
||||
- { date: "10.02.21:", desc: "Fix aliyun, domeneshop, inwx and transip dns confs for existing users." }
|
||||
- { date: "09.02.21:", desc: "Rebasing to alpine 3.13. Add nginx mods brotli and dav-ext. Remove nginx mods lua and lua-upstream (due to regression over the last couple of years)." }
|
||||
- { date: "26.01.21:", desc: "Add support for hetzner dns validation." }
|
||||
- { date: "20.01.21:", desc: "Add check for ZeroSSL EAB retrieval." }
|
||||
- { date: "08.01.21:", desc: "Add support for getting certs from [ZeroSSL](https://zerossl.com/) via optional `CERTPROVIDER` env var. Update aliyun, domeneshop, inwx and transip dns plugins with the new plugin names. Hide `donoteditthisfile.conf` because users were editing it despite its name. Suppress harmless error when no proxy confs are enabled." }
|
||||
- { date: "03.01.21:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) /config/nginx/site-confs/default - Add helper pages to aid troubleshooting" }
|
||||
- { date: "10.12.20:", desc: "Add support for njalla dns validation" }
|
||||
- { date: "09.12.20:", desc: "Check for template/conf updates and notify in the log. Add support for gehirn and sakuracloud dns validation." }
|
||||
|
||||
@@ -41,4 +41,4 @@
|
||||
<p>For help and support, please visit: <a target="_blank" href="https://www.linuxserver.io/support">linuxserver.io/support</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2020/05/31 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/authelia-location.conf
|
||||
## Version 2021/04/21 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/authelia-location.conf
|
||||
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
|
||||
# Make sure that the authelia configuration.yml has 'path: "authelia"' defined
|
||||
|
||||
@@ -6,6 +6,10 @@ auth_request /authelia/api/verify;
|
||||
auth_request_set $target_url $scheme://$http_host$request_uri;
|
||||
auth_request_set $user $upstream_http_remote_user;
|
||||
auth_request_set $groups $upstream_http_remote_groups;
|
||||
auth_request_set $name $upstream_http_remote_name;
|
||||
auth_request_set $email $upstream_http_remote_email;
|
||||
proxy_set_header Remote-User $user;
|
||||
proxy_set_header Remote-Groups $groups;
|
||||
proxy_set_header Remote-Name $name;
|
||||
proxy_set_header Remote-Email $email;
|
||||
error_page 401 =302 https://$http_host/authelia/?rd=$target_url;
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
## Version 2020/05/31 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/authelia-server.conf
|
||||
## Version 2021/05/28 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/authelia-server.conf
|
||||
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
|
||||
|
||||
location ^~ /authelia {
|
||||
include /config/nginx/proxy.conf;
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_authelia authelia;
|
||||
proxy_pass http://$upstream_authelia:9091;
|
||||
}
|
||||
|
||||
location = /authelia/api/verify {
|
||||
internal;
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
if ($request_uri ~ [^a-zA-Z0-9_+-=\!@$%&*?~.:#'\;\(\)\[\]]) {
|
||||
return 401;
|
||||
}
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_authelia authelia;
|
||||
proxy_pass_request_body off;
|
||||
proxy_pass http://$upstream_authelia:9091;
|
||||
@@ -28,7 +31,8 @@ location = /authelia/api/verify {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Method $request_method;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Uri $request_uri;
|
||||
|
||||
@@ -1,152 +1,163 @@
|
||||
## Version 2021/01/03 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/default
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/default
|
||||
|
||||
error_page 502 /502.html;
|
||||
|
||||
# redirect all traffic to https
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# main server block
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
|
||||
root /config/www;
|
||||
index index.html index.htm index.php;
|
||||
root /config/www;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
server_name _;
|
||||
server_name _;
|
||||
|
||||
# enable subfolder method reverse proxy confs
|
||||
include /config/nginx/proxy-confs/*.subfolder.conf;
|
||||
# enable subfolder method reverse proxy confs
|
||||
include /config/nginx/proxy-confs/*.subfolder.conf;
|
||||
|
||||
# all ssl related config moved to ssl.conf
|
||||
include /config/nginx/ssl.conf;
|
||||
# all ssl related config moved to ssl.conf
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
# enable for ldap auth
|
||||
#include /config/nginx/ldap.conf;
|
||||
# enable for ldap auth
|
||||
#include /config/nginx/ldap.conf;
|
||||
|
||||
# enable for Authelia
|
||||
#include /config/nginx/authelia-server.conf;
|
||||
# enable for Authelia
|
||||
#include /config/nginx/authelia-server.conf;
|
||||
|
||||
# enable for geo blocking
|
||||
# See /config/nginx/geoip2.conf for more information.
|
||||
#if ($allowed_country = no) {
|
||||
#return 444;
|
||||
#}
|
||||
# enable for geo blocking
|
||||
# See /config/nginx/geoip2.conf for more information.
|
||||
#if ($allowed_country = no) {
|
||||
#return 444;
|
||||
#}
|
||||
|
||||
client_max_body_size 0;
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html /index.php?$args =404;
|
||||
}
|
||||
location / {
|
||||
# enable the next two lines for http auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
# enable the next two lines for ldap auth
|
||||
#auth_request /auth;
|
||||
#error_page 401 =200 /ldaplogin;
|
||||
|
||||
# enable for Authelia
|
||||
#include /config/nginx/authelia-location.conf;
|
||||
|
||||
try_files $uri $uri/ /index.html /index.php?$args =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
# sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
|
||||
# notice this is within the same server block as the base
|
||||
# don't forget to generate the .htpasswd file as described on docker hub
|
||||
# location ^~ /cp {
|
||||
# auth_basic "Restricted";
|
||||
# auth_basic_user_file /config/nginx/.htpasswd;
|
||||
# include /config/nginx/proxy.conf;
|
||||
# proxy_pass http://192.168.1.50:5050/cp;
|
||||
# }
|
||||
# location ^~ /cp {
|
||||
# auth_basic "Restricted";
|
||||
# auth_basic_user_file /config/nginx/.htpasswd;
|
||||
# include /config/nginx/proxy.conf;
|
||||
# proxy_pass http://192.168.1.50:5050/cp;
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
# sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
|
||||
# notice this is a new server block, you need a new server block for each subdomain
|
||||
#server {
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
#
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
#
|
||||
# server_name cp.*;
|
||||
# server_name cp.*;
|
||||
#
|
||||
# include /config/nginx/ssl.conf;
|
||||
# include /config/nginx/ssl.conf;
|
||||
#
|
||||
# client_max_body_size 0;
|
||||
# client_max_body_size 0;
|
||||
#
|
||||
# location / {
|
||||
# auth_basic "Restricted";
|
||||
# auth_basic_user_file /config/nginx/.htpasswd;
|
||||
# include /config/nginx/proxy.conf;
|
||||
# proxy_pass http://192.168.1.50:5050;
|
||||
# }
|
||||
# location / {
|
||||
# auth_basic "Restricted";
|
||||
# auth_basic_user_file /config/nginx/.htpasswd;
|
||||
# include /config/nginx/proxy.conf;
|
||||
# proxy_pass http://192.168.1.50:5050;
|
||||
# }
|
||||
#}
|
||||
|
||||
# sample reverse proxy config for "heimdall" via subdomain, with ldap authentication
|
||||
# ldap-auth container has to be running and the /config/nginx/ldap.conf file should be filled with ldap info
|
||||
# notice this is a new server block, you need a new server block for each subdomain
|
||||
#server {
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
#
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
#
|
||||
# server_name heimdall.*;
|
||||
# server_name heimdall.*;
|
||||
#
|
||||
# include /config/nginx/ssl.conf;
|
||||
# include /config/nginx/ssl.conf;
|
||||
#
|
||||
# include /config/nginx/ldap.conf;
|
||||
# include /config/nginx/ldap.conf;
|
||||
#
|
||||
# client_max_body_size 0;
|
||||
# client_max_body_size 0;
|
||||
#
|
||||
# location / {
|
||||
# # the next two lines will enable ldap auth along with the included ldap.conf in the server block
|
||||
# auth_request /auth;
|
||||
# error_page 401 =200 /ldaplogin;
|
||||
# location / {
|
||||
# # the next two lines will enable ldap auth along with the included ldap.conf in the server block
|
||||
# auth_request /auth;
|
||||
# error_page 401 =200 /ldaplogin;
|
||||
#
|
||||
# include /config/nginx/proxy.conf;
|
||||
# resolver 127.0.0.11 valid=30s;
|
||||
# set $upstream_app heimdall;
|
||||
# set $upstream_port 443;
|
||||
# set $upstream_proto https;
|
||||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
# }
|
||||
# include /config/nginx/proxy.conf;
|
||||
# resolver 127.0.0.11 valid=30s;
|
||||
# set $upstream_app heimdall;
|
||||
# set $upstream_port 443;
|
||||
# set $upstream_proto https;
|
||||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
# }
|
||||
#}
|
||||
|
||||
# sample reverse proxy config for "heimdall" via subdomain, with Authelia
|
||||
# Authelia container has to be running in the same user defined bridge network, with container name "authelia", and with 'path: "authelia"' set in its configuration.yml
|
||||
# notice this is a new server block, you need a new server block for each subdomain
|
||||
#server {
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
# listen 443 ssl http2;
|
||||
# listen [::]:443 ssl http2;
|
||||
#
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
# root /config/www;
|
||||
# index index.html index.htm index.php;
|
||||
#
|
||||
# server_name heimdall.*;
|
||||
# server_name heimdall.*;
|
||||
#
|
||||
# include /config/nginx/ssl.conf;
|
||||
# include /config/nginx/ssl.conf;
|
||||
#
|
||||
# include /config/nginx/authelia-server.conf;
|
||||
# include /config/nginx/authelia-server.conf;
|
||||
#
|
||||
# client_max_body_size 0;
|
||||
# client_max_body_size 0;
|
||||
#
|
||||
# location / {
|
||||
# # the next line will enable Authelia along with the included authelia-server.conf in the server block
|
||||
# include /config/nginx/authelia-location.conf;
|
||||
# location / {
|
||||
# # the next line will enable Authelia along with the included authelia-server.conf in the server block
|
||||
# include /config/nginx/authelia-location.conf;
|
||||
#
|
||||
# include /config/nginx/proxy.conf;
|
||||
# resolver 127.0.0.11 valid=30s;
|
||||
# set $upstream_app heimdall;
|
||||
# set $upstream_port 443;
|
||||
# set $upstream_proto https;
|
||||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
# }
|
||||
# include /config/nginx/proxy.conf;
|
||||
# resolver 127.0.0.11 valid=30s;
|
||||
# set $upstream_app heimdall;
|
||||
# set $upstream_port 443;
|
||||
# set $upstream_proto https;
|
||||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
# }
|
||||
#}
|
||||
|
||||
# enable subdomain method reverse proxy confs
|
||||
|
||||
13
root/defaults/dhparams.pem
Normal file
13
root/defaults/dhparams.pem
Normal file
@@ -0,0 +1,13 @@
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIICCAKCAgEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
|
||||
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
|
||||
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
|
||||
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
|
||||
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
|
||||
ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3
|
||||
7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32
|
||||
nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZp4e
|
||||
8W5vUsMWTfT7eTDp5OWIV7asfV9C1p9tGHdjzx1VA0AEh/VbpX4xzHpxNciG77Qx
|
||||
iu1qHgEtnmgyqQdgCpGBMMRtx3j5ca0AOAkpmaMzy4t6Gh25PXFAADwqTs6p+Y0K
|
||||
zAqCkc3OyX3Pjsm1Wn+IpGtNtahR9EGC4caKAH5eZV9q//////////8CAQI=
|
||||
-----END DH PARAMETERS-----
|
||||
@@ -6,4 +6,4 @@ dns_cloudflare_email = cloudflare@example.com
|
||||
dns_cloudflare_api_key = 0123456789abcdef0123456789abcdef01234567
|
||||
|
||||
# With token (comment out both lines above and uncomment below):
|
||||
#dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567
|
||||
#dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# include the scheme and the port number (usually 2083 for https)
|
||||
certbot_dns_cpanel:cpanel_url = https://cpanel.example.com:2083
|
||||
certbot_dns_cpanel:cpanel_username = username
|
||||
certbot_dns_cpanel:cpanel_password = 1234567890abcdef
|
||||
certbot_dns_cpanel:cpanel_password = 1234567890abcdef
|
||||
|
||||
21
root/defaults/dns-conf/directadmin.ini
Normal file
21
root/defaults/dns-conf/directadmin.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
# Instructions: https://github.com/cybercinch/certbot-dns-directadmin/blob/master/certbot_dns_directadmin/__init__.py
|
||||
|
||||
# It is recommended to create a login key in the DirectAdmin control panel to be used as value for directadmin_password.
|
||||
# Instructions on how to create such key can be found at https://help.directadmin.com/item.php?id=523.
|
||||
#
|
||||
# Make sure to grant the following permissions:
|
||||
# - CMD_API_LOGIN_TEST
|
||||
# - CMD_API_DNS_CONTROL
|
||||
# - CMD_API_SHOW_DOMAINS
|
||||
#
|
||||
# Username and password can also be used in case your DirectAdmin instance has no support for login keys.
|
||||
|
||||
# The DirectAdmin Server url
|
||||
# include the scheme and the port number (Normally 2222)
|
||||
directadmin_url = https://my.directadminserver.com:2222
|
||||
|
||||
# The DirectAdmin username
|
||||
directadmin_username = username
|
||||
|
||||
# The DirectAdmin password
|
||||
directadmin_password = aSuperStrongPassword
|
||||
@@ -1,4 +1,4 @@
|
||||
# Instructions: https://github.com/domeneshop/certbot-dns-domeneshop#credentials
|
||||
# Replace with your values
|
||||
dns_domeneshop_client_token=1234567890abcdef
|
||||
dns_domeneshop_client_secret=1234567890abcdefghijklmnopqrstuvxyz1234567890abcdefghijklmnopqrs
|
||||
dns_domeneshop_client_secret=1234567890abcdefghijklmnopqrstuvxyz1234567890abcdefghijklmnopqrs
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
"_comment": "Replace with your values",
|
||||
"type": "service_account",
|
||||
"rest": "..."
|
||||
}
|
||||
}
|
||||
|
||||
3
root/defaults/dns-conf/hetzner.ini
Normal file
3
root/defaults/dns-conf/hetzner.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
# Instructions: https://github.com/ctrlaltcoop/certbot-dns-hetzner
|
||||
# Replace with your values
|
||||
dns_hetzner_api_token = nohnah4zoo9Kiejee9aGh0thoopee2sa
|
||||
@@ -1,6 +1,30 @@
|
||||
# Instructions: https://readthedocs.org/projects/certbot-dns-transip/
|
||||
# Convert the key to an RSA key (openssl rsa -in transip.key -out transip-rsa.key)
|
||||
# Place .key-file in the same directory as this file. Location "/config/dns-conf" is from within the container
|
||||
#
|
||||
# This DNS plugin can be used to generate SSL wildcard certificates via TransIP DNS TXT records
|
||||
#
|
||||
# Login with your TransIP account and go to My Account | API:
|
||||
# 1. API-settings: On
|
||||
#
|
||||
# 2. IP-address/ranges whitelist: Add a new authorized IP address (Swag Docker) to use the API
|
||||
#
|
||||
# 3. Generate a new Key Pair and copy the private key to a new transip.key file in the format:
|
||||
# -----BEGIN PRIVATE KEY-----
|
||||
# ...
|
||||
# -----END PRIVATE KEY-----
|
||||
#
|
||||
# 4. Convert the key to an RSA key with command:
|
||||
# openssl rsa -in transip.key -out /config/dns-conf/transip-rsa.key
|
||||
#
|
||||
# 5. Set permission
|
||||
# chmod 600 /config/dns-conf/transip-rsa.key
|
||||
#
|
||||
# 6. Replace <transip_username> below with your TransIP username
|
||||
#
|
||||
# 7. Create wildcard certificate with Swag environment variables:
|
||||
# SUBDOMAINS=wildcard
|
||||
# VALIDATION=dns
|
||||
# DNSPLUGIN=transip
|
||||
|
||||
dns_transip_username = <transip_username>
|
||||
dns_transip_key_file = /config/dns-conf/transip-rsa.key
|
||||
dns_transip_key_file = /config/dns-conf/transip-rsa.key
|
||||
|
||||
|
||||
3
root/defaults/dns-conf/vultr.ini
Normal file
3
root/defaults/dns-conf/vultr.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
# Instructions: https://github.com/lezgomatt/certbot-dns-vultr
|
||||
# Replace with your vultr Personal Access Token (see https://www.vultr.com/docs/how-to-setup-dynamic-dns).
|
||||
dns_vultr_key = YOUR_VULTR_API_KEY
|
||||
@@ -51,22 +51,22 @@ geo $allow_list {
|
||||
# Add the following if statements inside any server context where you want to geo block countries.
|
||||
|
||||
########################################
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# if ($allowed_country = no) {
|
||||
# return 444;
|
||||
# }
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# if ($allowed_country = no) {
|
||||
# return 444;
|
||||
# }
|
||||
#########################################
|
||||
|
||||
# Add the following if statements inside any server context where you want to geo block cities.
|
||||
########################################
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# if ($allowed_city = no) {
|
||||
# return 444;
|
||||
# }
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# if ($allowed_city = no) {
|
||||
# return 444;
|
||||
# }
|
||||
#########################################
|
||||
|
||||
# Example using a config from proxy-confs
|
||||
@@ -90,12 +90,12 @@ geo $allow_list {
|
||||
|
||||
# # Allow lan access if default is set to no
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# # Country geo block
|
||||
# if ($allowed_country = no) {
|
||||
# # Country geo block
|
||||
# if ($allowed_country = no) {
|
||||
# return 444;
|
||||
# }
|
||||
# }
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -36,4 +36,4 @@
|
||||
<p>For help and support, please visit: <a target="_blank" href="https://www.linuxserver.io/support">linuxserver.io/support</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,120 +1,150 @@
|
||||
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
|
||||
|
||||
user abc;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
# Set number of worker processes automatically based on number of CPU cores.
|
||||
include /config/nginx/worker_processes.conf;
|
||||
|
||||
# Enables the use of JIT for regular expressions to speed-up their processing.
|
||||
pcre_jit on;
|
||||
|
||||
# Configures default error logger.
|
||||
error_log /config/log/nginx/error.log;
|
||||
|
||||
# Includes files with directives to load dynamic modules.
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
# The maximum number of simultaneous connections that can be opened by
|
||||
# a worker process.
|
||||
worker_connections 1024;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
# Includes mapping of file name extensions to MIME types of responses
|
||||
# and defines the default type.
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
# Name servers used to resolve names of upstream servers into addresses.
|
||||
# It's also needed when using tcpsocket and udpsocket in Lua modules.
|
||||
#resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
|
||||
include /config/nginx/resolver.conf;
|
||||
|
||||
client_body_buffer_size 128k;
|
||||
client_max_body_size 0;
|
||||
keepalive_timeout 65;
|
||||
large_client_header_buffers 4 16k;
|
||||
send_timeout 5m;
|
||||
sendfile on;
|
||||
tcp_nodelay on;
|
||||
tcp_nopush on;
|
||||
types_hash_max_size 2048;
|
||||
variables_hash_max_size 2048;
|
||||
# Don't tell nginx version to the clients. Default is 'on'.
|
||||
server_tokens off;
|
||||
|
||||
# server_tokens off;
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
# Specifies the maximum accepted body size of a client request, as
|
||||
# indicated by the request header Content-Length. If the stated content
|
||||
# length is greater than this size, then the client receives the HTTP
|
||||
# error code 413. Set to 0 to disable. Default is '1m'.
|
||||
client_max_body_size 0;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
# Sendfile copies data between one FD and other from within the kernel,
|
||||
# which is more efficient than read() + write(). Default is off.
|
||||
sendfile on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
# Causes nginx to attempt to send its HTTP response head in one packet,
|
||||
# instead of using partial frames. Default is 'off'.
|
||||
tcp_nopush on;
|
||||
|
||||
access_log /config/log/nginx/access.log;
|
||||
error_log /config/log/nginx/error.log;
|
||||
# Helper variable for proxying websockets.
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
# Sets the path, format, and configuration for a buffered log write.
|
||||
access_log /config/log/nginx/access.log;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
# Includes virtual hosts configs.
|
||||
#include /etc/nginx/http.d/*.conf;
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
# WARNING: Don't use this directory for virtual hosts anymore.
|
||||
# This include will be moved to the root context in Alpine 3.14.
|
||||
#include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
##
|
||||
# nginx-naxsi config
|
||||
##
|
||||
# Uncomment it if you installed nginx-naxsi
|
||||
##
|
||||
|
||||
#include /etc/nginx/naxsi_core.rules;
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
##
|
||||
# nginx-passenger config
|
||||
##
|
||||
# Uncomment it if you installed nginx-passenger
|
||||
##
|
||||
client_body_buffer_size 128k;
|
||||
keepalive_timeout 65;
|
||||
large_client_header_buffers 4 16k;
|
||||
send_timeout 5m;
|
||||
tcp_nodelay on;
|
||||
types_hash_max_size 2048;
|
||||
variables_hash_max_size 2048;
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
#passenger_root /usr;
|
||||
#passenger_ruby /usr/bin/ruby;
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
##
|
||||
# WebSocket proxying
|
||||
##
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /config/nginx/site-confs/*;
|
||||
lua_load_resty_core off;
|
||||
##
|
||||
# nginx-naxsi config
|
||||
##
|
||||
# Uncomment it if you installed nginx-naxsi
|
||||
##
|
||||
|
||||
##
|
||||
# Geoip2 config
|
||||
##
|
||||
# Uncomment to add the Geoip2 configs needed to geo block countries/cities.
|
||||
##
|
||||
#include /etc/nginx/naxsi_core.rules;
|
||||
|
||||
#include /config/nginx/geoip2.conf;
|
||||
##
|
||||
# nginx-passenger config
|
||||
##
|
||||
# Uncomment it if you installed nginx-passenger
|
||||
##
|
||||
|
||||
#passenger_root /usr;
|
||||
#passenger_ruby /usr/bin/ruby;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
include /config/nginx/site-confs/*;
|
||||
#Removed lua. Do not remove this comment
|
||||
|
||||
##
|
||||
# Geoip2 config
|
||||
##
|
||||
# Uncomment to add the Geoip2 configs needed to geo block countries/cities.
|
||||
##
|
||||
|
||||
#include /config/nginx/geoip2.conf;
|
||||
}
|
||||
|
||||
|
||||
#mail {
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
#
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
#
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
#
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
#}
|
||||
|
||||
daemon off;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/proxy.conf
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/proxy.conf
|
||||
|
||||
# Timeout if the real server is dead
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2020/10/29 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/ssl.conf
|
||||
|
||||
### Mozilla Recommendations
|
||||
# generated 2020-06-17, Mozilla Guideline v5.4, nginx 1.18.0-r0, OpenSSL 1.1.1g-r0, intermediate configuration
|
||||
@@ -29,9 +29,6 @@ ssl_trusted_certificate /config/keys/letsencrypt/fullchain.pem;
|
||||
# Diffie-Hellman Parameters
|
||||
ssl_dhparam /config/nginx/dhparams.pem;
|
||||
|
||||
# Resolver
|
||||
resolver 127.0.0.11 valid=30s; # Docker DNS Server
|
||||
|
||||
# Enable TLS 1.3 early data
|
||||
ssl_early_data on;
|
||||
|
||||
|
||||
@@ -17,26 +17,26 @@ STAGING=${STAGING}\\n"
|
||||
|
||||
# Echo init finish for test runs
|
||||
if [ -n "${TEST_RUN}" ]; then
|
||||
echo '[services.d] done.'
|
||||
echo '[services.d] done.'
|
||||
fi
|
||||
|
||||
# Sanitize variables
|
||||
SANED_VARS=( DNSPLUGIN EMAIL EXTRA_DOMAINS ONLY_SUBDOMAINS STAGING SUBDOMAINS URL VALIDATION CERTPROVIDER )
|
||||
for i in "${SANED_VARS[@]}"
|
||||
do
|
||||
export echo "$i"="${!i//\"/}"
|
||||
export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')"
|
||||
export echo "$i"="${!i//\"/}"
|
||||
export echo "$i"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')"
|
||||
done
|
||||
|
||||
# check to make sure that the required variables are set
|
||||
[[ -z "$URL" ]] && \
|
||||
echo "Please pass your URL as an environment variable in your docker run command. See docker info for more details." && \
|
||||
sleep infinity
|
||||
echo "Please pass your URL as an environment variable in your docker run command. See docker info for more details." && \
|
||||
sleep infinity
|
||||
|
||||
# make our folders and links
|
||||
mkdir -p \
|
||||
/config/{log/letsencrypt,log/fail2ban,etc/letsencrypt,fail2ban,crontabs,dns-conf,geoip2db} \
|
||||
/var/run/fail2ban
|
||||
/config/{log/letsencrypt,log/fail2ban,etc/letsencrypt,fail2ban,crontabs,dns-conf,geoip2db} \
|
||||
/var/run/fail2ban
|
||||
rm -rf /etc/letsencrypt
|
||||
ln -s /config/etc/letsencrypt /etc/letsencrypt
|
||||
|
||||
@@ -52,12 +52,12 @@ cp -R /defaults/fail2ban/filter.d /config/fail2ban/
|
||||
cp -R /defaults/fail2ban/action.d /config/fail2ban/
|
||||
# if jail.local is missing in /config, copy default
|
||||
[[ ! -f /config/fail2ban/jail.local ]] && \
|
||||
cp /defaults/jail.local /config/fail2ban/jail.local
|
||||
cp /defaults/jail.local /config/fail2ban/jail.local
|
||||
# Replace fail2ban config with user config
|
||||
[[ -d /etc/fail2ban/filter.d ]] && \
|
||||
rm -rf /etc/fail2ban/filter.d
|
||||
rm -rf /etc/fail2ban/filter.d
|
||||
[[ -d /etc/fail2ban/action.d ]] && \
|
||||
rm -rf /etc/fail2ban/action.d
|
||||
rm -rf /etc/fail2ban/action.d
|
||||
cp -R /config/fail2ban/filter.d /etc/fail2ban/
|
||||
cp -R /config/fail2ban/action.d /etc/fail2ban/
|
||||
cp /defaults/fail2ban/fail2ban.local /etc/fail2ban/
|
||||
@@ -65,37 +65,66 @@ cp /config/fail2ban/jail.local /etc/fail2ban/jail.local
|
||||
|
||||
# copy crontab and proxy defaults if needed
|
||||
[[ ! -f /config/crontabs/root ]] && \
|
||||
cp /etc/crontabs/root /config/crontabs/
|
||||
cp /etc/crontabs/root /config/crontabs/
|
||||
[[ ! -f /config/nginx/proxy.conf ]] && \
|
||||
cp /defaults/proxy.conf /config/nginx/proxy.conf
|
||||
cp /defaults/proxy.conf /config/nginx/proxy.conf
|
||||
[[ ! -f /config/nginx/ssl.conf ]] && \
|
||||
cp /defaults/ssl.conf /config/nginx/ssl.conf
|
||||
cp /defaults/ssl.conf /config/nginx/ssl.conf
|
||||
[[ ! -f /config/nginx/ldap.conf ]] && \
|
||||
cp /defaults/ldap.conf /config/nginx/ldap.conf
|
||||
cp /defaults/ldap.conf /config/nginx/ldap.conf
|
||||
[[ ! -f /config/nginx/authelia-server.conf ]] && \
|
||||
cp /defaults/authelia-server.conf /config/nginx/authelia-server.conf
|
||||
cp /defaults/authelia-server.conf /config/nginx/authelia-server.conf
|
||||
[[ ! -f /config/nginx/authelia-location.conf ]] && \
|
||||
cp /defaults/authelia-location.conf /config/nginx/authelia-location.conf
|
||||
cp /defaults/authelia-location.conf /config/nginx/authelia-location.conf
|
||||
[[ ! -f /config/nginx/geoip2.conf ]] && \
|
||||
cp /defaults/geoip2.conf /config/nginx/geoip2.conf
|
||||
cp /defaults/geoip2.conf /config/nginx/geoip2.conf
|
||||
[[ ! -f /config/www/502.html ]] &&
|
||||
cp /defaults/502.html /config/www/502.html
|
||||
cp /defaults/502.html /config/www/502.html
|
||||
|
||||
# Set resolver, ignore ipv6 addresses
|
||||
if ! grep -q 'resolver' /config/nginx/resolver.conf; then
|
||||
RESOLVERRAW=$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf)
|
||||
for i in ${RESOLVERRAW}; do
|
||||
if [ $(awk -F ':' '{print NF-1}' <<< ${i}) -le 2 ]; then
|
||||
RESOLVER="${RESOLVER} ${i}"
|
||||
fi
|
||||
done
|
||||
if [ -z "${RESOLVER}" ]; then
|
||||
RESOLVER="127.0.0.11"
|
||||
fi
|
||||
echo "Setting resolver to ${RESOLVER}"
|
||||
echo -e "# This file is auto-generated only on first start, based on the container's /etc/resolv.conf file. Feel free to modify it as you wish.\n\nresolver ${RESOLVER} valid=30s;" > /config/nginx/resolver.conf
|
||||
fi
|
||||
|
||||
# Set worker_processes
|
||||
if ! grep -q 'worker_processes' /config/nginx/worker_processes.conf; then
|
||||
WORKER_PROCESSES=$(nproc)
|
||||
echo "Setting worker_processes to ${WORKER_PROCESSES}"
|
||||
echo -e "# This file is auto-generated only on first start, based on the cpu cores detected. Feel free to change it to any other number or to auto to let nginx handle it automatically.\n\nworker_processes ${WORKER_PROCESSES};" > /config/nginx/worker_processes.conf
|
||||
fi
|
||||
|
||||
# remove lua bits from nginx.conf if not done before
|
||||
if ! grep -q '#Removed lua' /config/nginx/nginx.conf; then
|
||||
echo "Removing lua specific info from nginx.conf"
|
||||
sed -i 's|\tlua_load_resty_core off;|\t#Removed lua. Do not remove this comment|g' /config/nginx/nginx.conf
|
||||
fi
|
||||
|
||||
# patch authelia-server.conf for CVE-2021-32637
|
||||
if ! grep -q 'if ($request_uri ~' /config/nginx/authelia-server.conf; then
|
||||
sed -i '/internal;/a \ \ \ \ if ($request_uri ~ [^a-zA-Z0-9_+-=\\!@$%&*?~.:#'\''\\;\\(\\)\\[\\]]) { return 401; }' /config/nginx/authelia-server.conf
|
||||
fi
|
||||
|
||||
# copy pre-generated dhparams or generate if needed
|
||||
[[ ! -f /config/nginx/dhparams.pem ]] && \
|
||||
cp /defaults/dhparams.pem /config/nginx/dhparams.pem
|
||||
cp /defaults/dhparams.pem /config/nginx/dhparams.pem
|
||||
if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
|
||||
curl -o /config/nginx/dhparams.pem -L "https://lsio.ams3.digitaloceanspaces.com/dhparams.pem"
|
||||
fi
|
||||
if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
|
||||
echo "Generating dhparams.pem. This will take a long time. Do not stop the container until this process is completed."
|
||||
openssl dhparam -out /config/nginx/dhparams.pem 4096
|
||||
curl -o /config/nginx/dhparams.pem -L "https://ssl-config.mozilla.org/ffdhe4096.txt"
|
||||
fi
|
||||
|
||||
# check to make sure DNSPLUGIN is selected if dns validation is used
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|inwx|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip)$ ]] && \
|
||||
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
|
||||
sleep infinity
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|directadmin|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip|vultr)$ ]] && \
|
||||
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
|
||||
sleep infinity
|
||||
|
||||
# import user crontabs
|
||||
rm /etc/crontabs/*
|
||||
@@ -103,11 +132,11 @@ cp /config/crontabs/* /etc/crontabs/
|
||||
|
||||
# create original config file if it doesn't exist, move non-hidden legacy file to hidden
|
||||
if [ -f "/config/donoteditthisfile.conf" ]; then
|
||||
mv /config/donoteditthisfile.conf /config/.donoteditthisfile.conf
|
||||
mv /config/donoteditthisfile.conf /config/.donoteditthisfile.conf
|
||||
fi
|
||||
if [ ! -f "/config/.donoteditthisfile.conf" ]; then
|
||||
echo -e "ORIGURL=\"$URL\" ORIGSUBDOMAINS=\"$SUBDOMAINS\" ORIGONLY_SUBDOMAINS=\"$ONLY_SUBDOMAINS\" ORIGEXTRA_DOMAINS=\"$EXTRA_DOMAINS\" ORIGVALIDATION=\"$VALIDATION\" ORIGDNSPLUGIN=\"$DNSPLUGIN\" ORIGPROPAGATION=\"$PROPAGATION\" ORIGSTAGING=\"$STAGING\" ORIGDUCKDNSTOKEN=\"$DUCKDNSTOKEN\" ORIGCERTPROVIDER=\"$CERTPROVIDER\" ORIGEMAIL=\"$EMAIL\"" > /config/.donoteditthisfile.conf
|
||||
echo "Created .donoteditthisfile.conf"
|
||||
echo -e "ORIGURL=\"$URL\" ORIGSUBDOMAINS=\"$SUBDOMAINS\" ORIGONLY_SUBDOMAINS=\"$ONLY_SUBDOMAINS\" ORIGEXTRA_DOMAINS=\"$EXTRA_DOMAINS\" ORIGVALIDATION=\"$VALIDATION\" ORIGDNSPLUGIN=\"$DNSPLUGIN\" ORIGPROPAGATION=\"$PROPAGATION\" ORIGSTAGING=\"$STAGING\" ORIGDUCKDNSTOKEN=\"$DUCKDNSTOKEN\" ORIGCERTPROVIDER=\"$CERTPROVIDER\" ORIGEMAIL=\"$EMAIL\"" > /config/.donoteditthisfile.conf
|
||||
echo "Created .donoteditthisfile.conf"
|
||||
fi
|
||||
|
||||
# load original config settings
|
||||
@@ -116,154 +145,161 @@ fi
|
||||
|
||||
# set default validation to http
|
||||
if [ -z "$VALIDATION" ]; then
|
||||
VALIDATION="http"
|
||||
echo "VALIDATION parameter not set; setting it to http"
|
||||
VALIDATION="http"
|
||||
echo "VALIDATION parameter not set; setting it to http"
|
||||
fi
|
||||
|
||||
# if zerossl is selected or staging is set to true, use the relevant server
|
||||
if [ "$CERTPROVIDER" = "zerossl" ] && [ "$STAGING" = "true" ]; then
|
||||
echo "ZeroSSL does not support staging mode, ignoring STAGING variable"
|
||||
echo "ZeroSSL does not support staging mode, ignoring STAGING variable"
|
||||
fi
|
||||
if [ "$CERTPROVIDER" = "zerossl" ] && [ -n "$EMAIL" ]; then
|
||||
echo "ZeroSSL is selected as the cert provider, registering cert with $EMAIL"
|
||||
ACMESERVER="https://acme.zerossl.com/v2/DV90"
|
||||
echo "ZeroSSL is selected as the cert provider, registering cert with $EMAIL"
|
||||
ACMESERVER="https://acme.zerossl.com/v2/DV90"
|
||||
elif [ "$CERTPROVIDER" = "zerossl" ] && [ -z "$EMAIL" ]; then
|
||||
echo "ZeroSSL is selected as the cert provider, but the e-mail address has not been entered. Please visit https://zerossl.com, register a new account and set the account e-mail address in the EMAIL environment variable"
|
||||
sleep infinity
|
||||
echo "ZeroSSL is selected as the cert provider, but the e-mail address has not been entered. Please visit https://zerossl.com, register a new account and set the account e-mail address in the EMAIL environment variable"
|
||||
sleep infinity
|
||||
elif [ "$STAGING" = "true" ]; then
|
||||
echo "NOTICE: Staging is active"
|
||||
echo "Using Let's Encrypt as the cert provider"
|
||||
ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
echo "NOTICE: Staging is active"
|
||||
echo "Using Let's Encrypt as the cert provider"
|
||||
ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
else
|
||||
echo "Using Let's Encrypt as the cert provider"
|
||||
ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
|
||||
echo "Using Let's Encrypt as the cert provider"
|
||||
ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
|
||||
fi
|
||||
|
||||
# figuring out url only vs url & subdomains vs subdomains only
|
||||
if [ -n "$SUBDOMAINS" ]; then
|
||||
echo "SUBDOMAINS entered, processing"
|
||||
if [ "$SUBDOMAINS" = "wildcard" ]; then
|
||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
||||
export URL_REAL="-d *.${URL}"
|
||||
echo "Wildcard cert for only the subdomains of $URL will be requested"
|
||||
else
|
||||
export URL_REAL="-d *.${URL} -d ${URL}"
|
||||
echo "Wildcard cert for $URL will be requested"
|
||||
fi
|
||||
else
|
||||
echo "SUBDOMAINS entered, processing"
|
||||
for job in $(echo "$SUBDOMAINS" | tr "," " "); do
|
||||
export SUBDOMAINS_REAL="$SUBDOMAINS_REAL -d ${job}.${URL}"
|
||||
done
|
||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
||||
URL_REAL="$SUBDOMAINS_REAL"
|
||||
echo "Only subdomains, no URL in cert"
|
||||
if [ "$SUBDOMAINS" = "wildcard" ]; then
|
||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
||||
export URL_REAL="-d *.${URL}"
|
||||
echo "Wildcard cert for only the subdomains of $URL will be requested"
|
||||
else
|
||||
export URL_REAL="-d *.${URL} -d ${URL}"
|
||||
echo "Wildcard cert for $URL will be requested"
|
||||
fi
|
||||
else
|
||||
URL_REAL="-d ${URL}${SUBDOMAINS_REAL}"
|
||||
echo "SUBDOMAINS entered, processing"
|
||||
for job in $(echo "$SUBDOMAINS" | tr "," " "); do
|
||||
export SUBDOMAINS_REAL="$SUBDOMAINS_REAL -d ${job}.${URL}"
|
||||
done
|
||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
||||
URL_REAL="$SUBDOMAINS_REAL"
|
||||
echo "Only subdomains, no URL in cert"
|
||||
else
|
||||
URL_REAL="-d ${URL}${SUBDOMAINS_REAL}"
|
||||
fi
|
||||
echo "Sub-domains processed are: $SUBDOMAINS_REAL"
|
||||
fi
|
||||
echo "Sub-domains processed are: $SUBDOMAINS_REAL"
|
||||
fi
|
||||
else
|
||||
echo "No subdomains defined"
|
||||
URL_REAL="-d $URL"
|
||||
echo "No subdomains defined"
|
||||
URL_REAL="-d $URL"
|
||||
fi
|
||||
|
||||
# add extra domains
|
||||
if [ -n "$EXTRA_DOMAINS" ]; then
|
||||
echo "EXTRA_DOMAINS entered, processing"
|
||||
for job in $(echo "$EXTRA_DOMAINS" | tr "," " "); do
|
||||
export EXTRA_DOMAINS_REAL="$EXTRA_DOMAINS_REAL -d ${job}"
|
||||
done
|
||||
echo "Extra domains processed are: $EXTRA_DOMAINS_REAL"
|
||||
URL_REAL="$URL_REAL $EXTRA_DOMAINS_REAL"
|
||||
echo "EXTRA_DOMAINS entered, processing"
|
||||
for job in $(echo "$EXTRA_DOMAINS" | tr "," " "); do
|
||||
export EXTRA_DOMAINS_REAL="$EXTRA_DOMAINS_REAL -d ${job}"
|
||||
done
|
||||
echo "Extra domains processed are: $EXTRA_DOMAINS_REAL"
|
||||
URL_REAL="$URL_REAL $EXTRA_DOMAINS_REAL"
|
||||
fi
|
||||
|
||||
# figuring out whether to use e-mail and which
|
||||
if [[ $EMAIL == *@* ]]; then
|
||||
echo "E-mail address entered: ${EMAIL}"
|
||||
EMAILPARAM="-m ${EMAIL} --no-eff-email"
|
||||
echo "E-mail address entered: ${EMAIL}"
|
||||
EMAILPARAM="-m ${EMAIL} --no-eff-email"
|
||||
else
|
||||
echo "No e-mail address entered or address invalid"
|
||||
EMAILPARAM="--register-unsafely-without-email"
|
||||
echo "No e-mail address entered or address invalid"
|
||||
EMAILPARAM="--register-unsafely-without-email"
|
||||
fi
|
||||
|
||||
# update plugin names in dns conf inis
|
||||
sed -i 's|^certbot_dns_aliyun:||g' /defaults/dns-conf/aliyun.ini
|
||||
sed -i 's|^certbot_dns_domeneshop:||g' /defaults/dns-conf/domeneshop.ini
|
||||
sed -i 's|^certbot_dns_inwx:||g' /defaults/dns-conf/inwx.ini
|
||||
sed -i 's|^certbot_dns_transip:||g' /defaults/dns-conf/transip.ini
|
||||
sed -i 's|^certbot_dns_aliyun:||g' /config/dns-conf/aliyun.ini
|
||||
sed -i 's|^certbot_dns_domeneshop:||g' /config/dns-conf/domeneshop.ini
|
||||
sed -i 's|^certbot_dns_inwx:||g' /config/dns-conf/inwx.ini
|
||||
sed -i 's|^certbot_dns_transip:||g' /config/dns-conf/transip.ini
|
||||
|
||||
# setting the validation method to use
|
||||
if [ "$VALIDATION" = "dns" ]; then
|
||||
if [ "$DNSPLUGIN" = "route53" ]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(cpanel)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(gandi)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then echo "Gandi dns plugin does not support setting propagation time"; fi
|
||||
PREFCHAL="-a certbot-plugin-${DNSPLUGIN}:dns --certbot-plugin-${DNSPLUGIN}:dns-credentials /config/dns-conf/${DNSPLUGIN}.ini"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|inwx|netcup|njalla|transip)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
else
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
fi
|
||||
echo "${VALIDATION} validation via ${DNSPLUGIN} plugin is selected"
|
||||
if [ "$DNSPLUGIN" = "route53" ]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(cpanel)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(gandi)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then echo "Gandi dns plugin does not support setting propagation time"; fi
|
||||
PREFCHAL="-a certbot-plugin-${DNSPLUGIN}:dns --certbot-plugin-${DNSPLUGIN}:dns-credentials /config/dns-conf/${DNSPLUGIN}.ini"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|hetzner|inwx|netcup|njalla|transip|vultr)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(directadmin)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a ${DNSPLUGIN} --${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
else
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
fi
|
||||
echo "${VALIDATION} validation via ${DNSPLUGIN} plugin is selected"
|
||||
elif [ "$VALIDATION" = "tls-sni" ]; then
|
||||
PREFCHAL="--non-interactive --standalone --preferred-challenges http"
|
||||
echo "*****tls-sni validation has been deprecated, attempting http validation instead"
|
||||
PREFCHAL="--non-interactive --standalone --preferred-challenges http"
|
||||
echo "*****tls-sni validation has been deprecated, attempting http validation instead"
|
||||
elif [ "$VALIDATION" = "duckdns" ]; then
|
||||
PREFCHAL="--non-interactive --manual --preferred-challenges dns --manual-auth-hook /app/duckdns-txt"
|
||||
chmod +x /app/duckdns-txt
|
||||
echo "duckdns validation is selected"
|
||||
if [ "$SUBDOMAINS" = "wildcard" ]; then
|
||||
echo "the resulting certificate will only cover the subdomains due to a limitation of duckdns, so it is advised to set the root location to use www.subdomain.duckdns.org"
|
||||
export URL_REAL="-d *.${URL}"
|
||||
else
|
||||
echo "the resulting certificate will only cover the main domain due to a limitation of duckdns, ie. subdomain.duckdns.org"
|
||||
export URL_REAL="-d ${URL}"
|
||||
fi
|
||||
PREFCHAL="--non-interactive --manual --preferred-challenges dns --manual-auth-hook /app/duckdns-txt"
|
||||
chmod +x /app/duckdns-txt
|
||||
echo "duckdns validation is selected"
|
||||
if [ "$SUBDOMAINS" = "wildcard" ]; then
|
||||
echo "the resulting certificate will only cover the subdomains due to a limitation of duckdns, so it is advised to set the root location to use www.subdomain.duckdns.org"
|
||||
export URL_REAL="-d *.${URL}"
|
||||
else
|
||||
echo "the resulting certificate will only cover the main domain due to a limitation of duckdns, ie. subdomain.duckdns.org"
|
||||
export URL_REAL="-d ${URL}"
|
||||
fi
|
||||
else
|
||||
PREFCHAL="--non-interactive --standalone --preferred-challenges http"
|
||||
echo "http validation is selected"
|
||||
PREFCHAL="--non-interactive --standalone --preferred-challenges http"
|
||||
echo "http validation is selected"
|
||||
fi
|
||||
|
||||
# setting the symlink for key location
|
||||
rm -rf /config/keys/letsencrypt
|
||||
if [ "$ONLY_SUBDOMAINS" = "true" ] && [ ! "$SUBDOMAINS" = "wildcard" ] ; then
|
||||
DOMAIN="$(echo "$SUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${URL}"
|
||||
ln -s ../etc/letsencrypt/live/"$DOMAIN" /config/keys/letsencrypt
|
||||
DOMAIN="$(echo "$SUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${URL}"
|
||||
ln -s ../etc/letsencrypt/live/"$DOMAIN" /config/keys/letsencrypt
|
||||
else
|
||||
ln -s ../etc/letsencrypt/live/"$URL" /config/keys/letsencrypt
|
||||
ln -s ../etc/letsencrypt/live/"$URL" /config/keys/letsencrypt
|
||||
fi
|
||||
|
||||
# checking for changes in cert variables, revoking certs if necessary
|
||||
if [ ! "$URL" = "$ORIGURL" ] || [ ! "$SUBDOMAINS" = "$ORIGSUBDOMAINS" ] || [ ! "$ONLY_SUBDOMAINS" = "$ORIGONLY_SUBDOMAINS" ] || [ ! "$EXTRA_DOMAINS" = "$ORIGEXTRA_DOMAINS" ] || [ ! "$VALIDATION" = "$ORIGVALIDATION" ] || [ ! "$DNSPLUGIN" = "$ORIGDNSPLUGIN" ] || [ ! "$PROPAGATION" = "$ORIGPROPAGATION" ] || [ ! "$STAGING" = "$ORIGSTAGING" ] || [ ! "$DUCKDNSTOKEN" = "$ORIGDUCKDNSTOKEN" ] || [ ! "$CERTPROVIDER" = "$ORIGCERTPROVIDER" ]; then
|
||||
echo "Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created"
|
||||
if [ "$ORIGONLY_SUBDOMAINS" = "true" ] && [ ! "$ORIGSUBDOMAINS" = "wildcard" ]; then
|
||||
ORIGDOMAIN="$(echo "$ORIGSUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${ORIGURL}"
|
||||
else
|
||||
ORIGDOMAIN="$ORIGURL"
|
||||
fi
|
||||
if [ "$ORIGCERTPROVIDER" = "zerossl" ] && [ -n "$ORIGEMAIL" ]; then
|
||||
REV_EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=$ORIGEMAIL")
|
||||
REV_ZEROSSL_EAB_KID=$(echo "$REV_EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
|
||||
REV_ZEROSSL_EAB_HMAC_KEY=$(echo "$REV_EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
|
||||
REV_ACMESERVER="https://acme.zerossl.com/v2/DV90 --eab-kid ${REV_ZEROSSL_EAB_KID} --eab-hmac-key ${REV_ZEROSSL_EAB_HMAC_KEY}"
|
||||
elif [ "$ORIGSTAGING" = "true" ]; then
|
||||
REV_ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
else
|
||||
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
|
||||
fi
|
||||
[[ -f /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem ]] && certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER
|
||||
rm -rf /config/etc/letsencrypt
|
||||
mkdir -p /config/etc/letsencrypt
|
||||
echo "Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created"
|
||||
if [ "$ORIGONLY_SUBDOMAINS" = "true" ] && [ ! "$ORIGSUBDOMAINS" = "wildcard" ]; then
|
||||
ORIGDOMAIN="$(echo "$ORIGSUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${ORIGURL}"
|
||||
else
|
||||
ORIGDOMAIN="$ORIGURL"
|
||||
fi
|
||||
if [ "$ORIGCERTPROVIDER" = "zerossl" ] && [ -n "$ORIGEMAIL" ]; then
|
||||
REV_EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=$ORIGEMAIL")
|
||||
REV_ZEROSSL_EAB_KID=$(echo "$REV_EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
|
||||
REV_ZEROSSL_EAB_HMAC_KEY=$(echo "$REV_EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
|
||||
if [ -z "$REV_ZEROSSL_EAB_KID" ] || [ -z "$REV_ZEROSSL_EAB_HMAC_KEY" ]; then
|
||||
echo "Unable to retrieve EAB credentials from ZeroSSL. Check the outgoing connections to api.zerossl.com and dns. Sleeping."
|
||||
sleep infinity
|
||||
fi
|
||||
REV_ACMESERVER="https://acme.zerossl.com/v2/DV90 --eab-kid ${REV_ZEROSSL_EAB_KID} --eab-hmac-key ${REV_ZEROSSL_EAB_HMAC_KEY}"
|
||||
elif [ "$ORIGSTAGING" = "true" ]; then
|
||||
REV_ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
else
|
||||
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
|
||||
fi
|
||||
[[ -f /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem ]] && certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER
|
||||
rm -rf /config/etc/letsencrypt
|
||||
mkdir -p /config/etc/letsencrypt
|
||||
fi
|
||||
|
||||
# saving new variables
|
||||
@@ -271,70 +307,74 @@ echo -e "ORIGURL=\"$URL\" ORIGSUBDOMAINS=\"$SUBDOMAINS\" ORIGONLY_SUBDOMAINS=\"$
|
||||
|
||||
# alter extension for error message
|
||||
if [ "$DNSPLUGIN" = "google" ]; then
|
||||
FILENAME="$DNSPLUGIN.json"
|
||||
FILENAME="$DNSPLUGIN.json"
|
||||
else
|
||||
FILENAME="$DNSPLUGIN.ini"
|
||||
FILENAME="$DNSPLUGIN.ini"
|
||||
fi
|
||||
|
||||
# generating certs if necessary
|
||||
if [ ! -f "/config/keys/letsencrypt/fullchain.pem" ]; then
|
||||
if [ "$CERTPROVIDER" = "zerossl" ] && [ -n "$EMAIL" ]; then
|
||||
echo "Retrieving EAB from ZeroSSL"
|
||||
EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=$EMAIL")
|
||||
ZEROSSL_EAB_KID=$(echo "$EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
|
||||
ZEROSSL_EAB_HMAC_KEY=$(echo "$EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
|
||||
ZEROSSL_EAB="--eab-kid ${ZEROSSL_EAB_KID} --eab-hmac-key ${ZEROSSL_EAB_HMAC_KEY}"
|
||||
fi
|
||||
echo "Generating new certificate"
|
||||
# shellcheck disable=SC2086
|
||||
certbot certonly --renew-by-default --server $ACMESERVER $ZEROSSL_EAB $PREFCHAL --rsa-key-size 4096 $EMAILPARAM --agree-tos $URL_REAL
|
||||
if [ -d /config/keys/letsencrypt ]; then
|
||||
cd /config/keys/letsencrypt || exit
|
||||
else
|
||||
if [ "$VALIDATION" = "dns" ]; then
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/${FILENAME} file."
|
||||
elif [ "$VALIDATION" = "duckdns" ]; then
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. Make sure your DUCKDNSTOKEN is correct."
|
||||
else
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container"
|
||||
if [ "$CERTPROVIDER" = "zerossl" ] && [ -n "$EMAIL" ]; then
|
||||
echo "Retrieving EAB from ZeroSSL"
|
||||
EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=$EMAIL")
|
||||
ZEROSSL_EAB_KID=$(echo "$EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
|
||||
ZEROSSL_EAB_HMAC_KEY=$(echo "$EAB_CREDS" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
|
||||
if [ -z "$ZEROSSL_EAB_KID" ] || [ -z "$ZEROSSL_EAB_HMAC_KEY" ]; then
|
||||
echo "Unable to retrieve EAB credentials from ZeroSSL. Check the outgoing connections to api.zerossl.com and dns. Sleeping."
|
||||
sleep infinity
|
||||
fi
|
||||
ZEROSSL_EAB="--eab-kid ${ZEROSSL_EAB_KID} --eab-hmac-key ${ZEROSSL_EAB_HMAC_KEY}"
|
||||
fi
|
||||
sleep infinity
|
||||
fi
|
||||
openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass:
|
||||
sleep 1
|
||||
cat {privkey,fullchain}.pem > priv-fullchain-bundle.pem
|
||||
echo "New certificate generated; starting nginx"
|
||||
echo "Generating new certificate"
|
||||
# shellcheck disable=SC2086
|
||||
certbot certonly --renew-by-default --server $ACMESERVER $ZEROSSL_EAB $PREFCHAL --rsa-key-size 4096 $EMAILPARAM --agree-tos $URL_REAL
|
||||
if [ -d /config/keys/letsencrypt ]; then
|
||||
cd /config/keys/letsencrypt || exit
|
||||
else
|
||||
if [ "$VALIDATION" = "dns" ]; then
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/${FILENAME} file."
|
||||
elif [ "$VALIDATION" = "duckdns" ]; then
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. Make sure your DUCKDNSTOKEN is correct."
|
||||
else
|
||||
echo "ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container"
|
||||
fi
|
||||
sleep infinity
|
||||
fi
|
||||
openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass:
|
||||
sleep 1
|
||||
cat {privkey,fullchain}.pem > priv-fullchain-bundle.pem
|
||||
echo "New certificate generated; starting nginx"
|
||||
else
|
||||
echo "Certificate exists; parameters unchanged; starting nginx"
|
||||
echo "Certificate exists; parameters unchanged; starting nginx"
|
||||
fi
|
||||
|
||||
# create GeoIP2 folder symlink
|
||||
[[ -d /var/lib/libmaxminddb ]] && [[ ! -L /var/lib/libmaxminddb ]] && \
|
||||
rm -rf /var/lib/libmaxminddb
|
||||
rm -rf /var/lib/libmaxminddb
|
||||
[[ ! -d /var/lib/libmaxminddb ]] && \
|
||||
ln -s /config/geoip2db /var/lib/libmaxminddb
|
||||
ln -s /config/geoip2db /var/lib/libmaxminddb
|
||||
# check GeoIP2 database
|
||||
if [ -n "$MAXMINDDB_LICENSE_KEY" ]; then
|
||||
sed -i "s|.*MAXMINDDB_LICENSE_KEY.*|MAXMINDDB_LICENSE_KEY=\"${MAXMINDDB_LICENSE_KEY}\"|g" /etc/conf.d/libmaxminddb
|
||||
if [ ! -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]; then
|
||||
echo "Downloading GeoIP2 City database."
|
||||
/etc/periodic/weekly/libmaxminddb
|
||||
fi
|
||||
sed -i "s|.*MAXMINDDB_LICENSE_KEY.*|MAXMINDDB_LICENSE_KEY=\"${MAXMINDDB_LICENSE_KEY}\"|g" /etc/conf.d/libmaxminddb
|
||||
if [ ! -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]; then
|
||||
echo "Downloading GeoIP2 City database."
|
||||
/etc/periodic/weekly/libmaxminddb
|
||||
fi
|
||||
elif [ -f /var/lib/libmaxminddb/GeoLite2-City.mmdb ]; then
|
||||
echo -e "Currently using the user provided GeoLite2-City.mmdb.\nIf you want to enable weekly auto-updates of the database, retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
|
||||
echo -e "Currently using the user provided GeoLite2-City.mmdb.\nIf you want to enable weekly auto-updates of the database, retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
|
||||
else
|
||||
echo -e "Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
|
||||
echo -e "Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,\nand add a new env variable \"MAXMINDDB_LICENSE_KEY\", set to your license key."
|
||||
fi
|
||||
|
||||
# logfiles needed by fail2ban
|
||||
[[ ! -f /config/log/nginx/error.log ]] && \
|
||||
touch /config/log/nginx/error.log
|
||||
touch /config/log/nginx/error.log
|
||||
[[ ! -f /config/log/nginx/access.log ]] && \
|
||||
touch /config/log/nginx/access.log
|
||||
touch /config/log/nginx/access.log
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config
|
||||
/config
|
||||
chmod -R 0644 /etc/logrotate.d
|
||||
chmod -R +r /config/log
|
||||
chmod +x /app/le-renew.sh
|
||||
|
||||
@@ -7,4 +7,4 @@ else
|
||||
echo "The cert is either expired or it expires within the next day. Attempting to renew. This could take up to 10 minutes."
|
||||
/app/le-renew.sh
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/config/log/letsencrypt/*.log {
|
||||
weekly
|
||||
rotate 52
|
||||
compress
|
||||
delaycompress
|
||||
nodateext
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
su abc abc
|
||||
weekly
|
||||
rotate 52
|
||||
compress
|
||||
delaycompress
|
||||
nodateext
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
su abc abc
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
exec \
|
||||
fail2ban-client -x -f start
|
||||
exec \
|
||||
fail2ban-client -x -f start
|
||||
|
||||
Reference in New Issue
Block a user