Compare commits

..

42 Commits

Author SHA1 Message Date
LinuxServer-CI
2988ac4a5f Bot Updating Package Versions 2021-02-15 08:52:22 -05:00
LinuxServer-CI
a158c34ab9 Bot Updating Package Versions 2021-02-12 14:33:29 +00:00
LinuxServer-CI
ed57a1038e Bot Updating Templated Files 2021-02-12 14:10:06 +00:00
Roxedus
a8c55b455a Merge pull request #87 from linuxserver/cleanup
cleanup cargo/rust crud
2021-02-12 15:08:36 +01:00
aptalca
f0be12bcda cleanup cargo/rust crud 2021-02-12 08:39:08 -05:00
Eric Nemchik
adfe04cedb Merge pull request #83 from linuxserver/sed
fix the right inis
2021-02-10 18:11:22 -06:00
Eric Nemchik
d075d3e2c3 Merge pull request #69 from Erriez/transip-documentation
Add documentation TransIP DNS TXT usage
2021-02-10 18:11:15 -06:00
aptalca
a84c6883a6 fix the right inis 2021-02-10 13:35:55 -05:00
LinuxServer-CI
61a5c40902 Bot Updating Package Versions 2021-02-10 15:54:58 +00:00
aptalca
0a32a84d8a Merge pull request #80 from linuxserver/master-3.13
Rebase to 3.13, add brotli and dav-ext, remove lua
2021-02-10 10:35:03 -05:00
aptalca
e7b5816304 enable rust for py crypto 2021-02-10 09:52:09 -05:00
aptalca
b71f99cb7b Merge branch 'master' into master-3.13 2021-02-10 09:51:11 -05:00
Erriez
dbd8fd4bd0 Add comments TransIP DNS TXT usage 2021-02-09 19:47:20 +01:00
aptalca
9074cf2d44 I like to copy pasta 2021-02-09 11:23:08 -05:00
aptalca
479ee5eac1 add brotli and dav-ext, remove lua 2021-02-09 10:50:54 -05:00
LinuxServer-CI
d7ce59b839 Bot Updating Package Versions 2021-02-09 05:59:41 -05:00
Roxedus
69fdcc1ff3 Merge pull request #79 from linuxserver/crypt
avoid rust for py crypto
2021-02-09 11:48:06 +01:00
aptalca
00484f51d8 avoid rust for py crypto 2021-02-08 21:57:15 -05:00
aptalca
363ba433cc Merge branch 'master' into master-3.13 2021-02-08 17:14:52 -05:00
aptalca
de98308c70 add cargo/rust to fix cryptography builds 2021-02-08 16:06:12 -05:00
aptalca
db657fa06a Merge pull request #67 from linuxserver/hetzner
add support for hetzner dns validation
2021-01-27 10:29:09 -05:00
aptalca
6f25f82996 add support for hetzner dns validation 2021-01-26 18:11:44 -05:00
thelamer
ea8b193858 Rebasing to Alpine 3.13 2021-01-23 15:13:00 -08:00
aptalca
d5c8106aac Merge pull request #61 from linuxserver/typo
fix typo
2021-01-23 17:22:09 -05:00
aptalca
cd5f29a8b0 fix typo 2021-01-23 15:49:03 -05:00
LinuxServer-CI
693da376b7 Bot Updating Package Versions 2021-01-20 10:56:21 -05:00
aptalca
d9f3a34a42 Merge pull request #60 from linuxserver/zerocheck
Add check for ZeroSSL EAB retrieval
2021-01-20 10:41:21 -05:00
aptalca
8ac274550f fix var name 2021-01-20 09:34:20 -05:00
aptalca
07e1ab096c Add check for ZeroSSL EAB retrieval 2021-01-20 08:43:55 -05:00
LinuxServer-CI
99a4c55dcb Bot Updating Package Versions 2021-01-13 09:08:27 -05:00
LinuxServer-CI
9a09573590 Bot Updating Templated Files 2021-01-13 08:53:18 -05:00
aptalca
00511ebb7a Merge pull request #48 from linuxserver/zerossl
Add ZeroSSL support via CERTPROVIDER var
2021-01-13 08:51:48 -05:00
aptalca
71747b2a6f add more info to changelog 2021-01-08 18:21:28 -05:00
aptalca
af548a0966 Merge branch 'master' into zerossl 2021-01-08 18:16:07 -05:00
aptalca
87cdcfdb18 update dns conf inis 2020-12-27 16:48:09 -05:00
aptalca
71397b40fd update dns plugin names 2020-12-20 18:17:29 -05:00
aptalca
832dde3b35 remove unnecessary eab retrieval
also suppress error when no proxy confs are activated
2020-12-20 16:55:11 -05:00
aptalca
21e9d7298a fix typo 2020-12-10 16:43:54 -05:00
aptalca
1f85492fd5 save EMAIL value for later reuse 2020-12-10 16:04:10 -05:00
aptalca
3844b7f660 add zerossl support cert revokes 2020-12-10 14:32:15 -05:00
aptalca
7f6840373a update conf name in scripts 2020-12-10 13:37:53 -05:00
aptalca
371b7d49ec Add ZeroSSL support via CERTPROVIDER var
and make donoteditthisfile.conf hidden
2020-12-10 11:58:52 -05:00
21 changed files with 412 additions and 244 deletions

View File

@@ -22,8 +22,9 @@ jobs:
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****" echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for swag branch master" FAILURE_REASON="Can't retrieve external version for swag branch master"
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-swag/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1 exit 1
fi fi

View File

@@ -8,6 +8,6 @@ jobs:
steps: steps:
- uses: actions/first-interaction@v1 - uses: actions/first-interaction@v1
with: with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-swag/blob/master/.github/ISSUE_TEMPLATE.md)!' issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-swag/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-swag/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-swag/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-swag/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
on: on:
schedule: schedule:
- cron: '55 13 * * 5' - cron: '03 5 * * 4'
workflow_dispatch: workflow_dispatch:
jobs: jobs:

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.jenkins-external

View File

@@ -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 # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -14,6 +14,7 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
cargo \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
@@ -26,13 +27,13 @@ RUN \
gnupg \ gnupg \
memcached \ memcached \
nginx \ nginx \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
nginx-mod-http-fancyindex \ nginx-mod-http-fancyindex \
nginx-mod-http-geoip2 \ nginx-mod-http-geoip2 \
nginx-mod-http-headers-more \ nginx-mod-http-headers-more \
nginx-mod-http-image-filter \ nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \ nginx-mod-http-nchan \
nginx-mod-http-perl \ nginx-mod-http-perl \
nginx-mod-http-redis2 \ nginx-mod-http-redis2 \
@@ -104,6 +105,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-linode \ certbot-dns-linode \
certbot-dns-luadns \ certbot-dns-luadns \
@@ -146,7 +148,8 @@ RUN \
; done && \ ; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache /root/.cache \
/root/.cargo
# add local files # add local files
COPY root/ / COPY root/ /

View File

@@ -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 # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -14,6 +14,7 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
cargo \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
@@ -26,13 +27,13 @@ RUN \
gnupg \ gnupg \
memcached \ memcached \
nginx \ nginx \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
nginx-mod-http-fancyindex \ nginx-mod-http-fancyindex \
nginx-mod-http-geoip2 \ nginx-mod-http-geoip2 \
nginx-mod-http-headers-more \ nginx-mod-http-headers-more \
nginx-mod-http-image-filter \ nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \ nginx-mod-http-nchan \
nginx-mod-http-perl \ nginx-mod-http-perl \
nginx-mod-http-redis2 \ nginx-mod-http-redis2 \
@@ -104,6 +105,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-linode \ certbot-dns-linode \
certbot-dns-luadns \ certbot-dns-luadns \
@@ -146,7 +148,8 @@ RUN \
; done && \ ; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache /root/.cache \
/root/.cargo
# add local files # add local files
COPY root/ / COPY root/ /

View File

@@ -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 # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -14,6 +14,7 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
cargo \
g++ \ g++ \
gcc \ gcc \
libffi-dev \ libffi-dev \
@@ -26,13 +27,13 @@ RUN \
gnupg \ gnupg \
memcached \ memcached \
nginx \ nginx \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
nginx-mod-http-echo \ nginx-mod-http-echo \
nginx-mod-http-fancyindex \ nginx-mod-http-fancyindex \
nginx-mod-http-geoip2 \ nginx-mod-http-geoip2 \
nginx-mod-http-headers-more \ nginx-mod-http-headers-more \
nginx-mod-http-image-filter \ nginx-mod-http-image-filter \
nginx-mod-http-lua \
nginx-mod-http-lua-upstream \
nginx-mod-http-nchan \ nginx-mod-http-nchan \
nginx-mod-http-perl \ nginx-mod-http-perl \
nginx-mod-http-redis2 \ nginx-mod-http-redis2 \
@@ -104,6 +105,7 @@ RUN \
certbot-dns-dnsmadeeasy \ certbot-dns-dnsmadeeasy \
certbot-dns-domeneshop \ certbot-dns-domeneshop \
certbot-dns-google \ certbot-dns-google \
certbot-dns-hetzner \
certbot-dns-inwx \ certbot-dns-inwx \
certbot-dns-linode \ certbot-dns-linode \
certbot-dns-luadns \ certbot-dns-luadns \
@@ -146,7 +148,8 @@ RUN \
; done && \ ; done && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/root/.cache /root/.cache \
/root/.cargo
# add local files # add local files
COPY root/ / COPY root/ /

88
Jenkinsfile vendored
View File

@@ -231,10 +231,53 @@ pipeline {
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest 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 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) CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME} cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8) 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 mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO}
@@ -242,11 +285,13 @@ pipeline {
cd ${TEMPDIR}/docker-${CONTAINER_NAME} cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE 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}/ || : cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cd ${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 add ${TEMPLATED_FILES}
git rm .github/ISSUE_TEMPLATE.md || :
git commit -m 'Bot Updating Templated Files' git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
@@ -255,13 +300,30 @@ pipeline {
fi fi
mkdir -p ${TEMPDIR}/gitbook mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -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 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}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/ cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/ cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md git add images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Documentation' git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi fi
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}/.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}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "Image is on the ignore list, skipping Unraid template upload"
else
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
cd ${TEMPDIR}/unraid/templates/
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
fi
rm -Rf ${TEMPDIR}''' rm -Rf ${TEMPDIR}'''
script{ script{
env.FILES_UPDATED = sh( env.FILES_UPDATED = sh(
@@ -495,7 +557,7 @@ pipeline {
} }
sh '''#! /bin/bash sh '''#! /bin/bash
set -e set -e
docker pull ghcr.io/linuxserver/lsiodev-ci:latest docker pull ghcr.io/linuxserver/ci:latest
if [ "${MULTIARCH}" == "true" ]; then if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
@@ -520,7 +582,7 @@ pipeline {
-e WEB_PATH=\"${CI_WEBPATH}\" \ -e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \ -e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \ -e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/lsiodev-ci:latest \ -t ghcr.io/linuxserver/ci:latest \
python /ci/ci.py''' python /ci/ci.py'''
} }
} }
@@ -665,9 +727,9 @@ pipeline {
environment name: 'EXIT_STATUS', value: '' environment name: 'EXIT_STATUS', value: ''
} }
steps { 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 \ 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}'",\ "object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
"type": "commit",\ "type": "commit",\
@@ -675,9 +737,9 @@ pipeline {
echo "Pushing New release for Tag" echo "Pushing New release for Tag"
sh '''#! /bin/bash sh '''#! /bin/bash
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json 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",\ "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 "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**PIP Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> releasebody.json printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done paste -d'\\0' start releasebody.json > releasebody.json.done
@@ -704,7 +766,7 @@ pipeline {
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest 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 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 pull ghcr.io/linuxserver/readme-sync
docker run --rm=true \ docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \ -e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \ -e DOCKERHUB_PASSWORD=$DOCKERPASS \
@@ -712,7 +774,7 @@ pipeline {
-e DOCKER_REPOSITORY=${IMAGE} \ -e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \ -e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ -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} ''' rm -Rf ${TEMPDIR} '''
} }
} }

View File

@@ -38,7 +38,7 @@ Find us at:
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-swag%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/) [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-swag%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/)
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fswag%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/swag/latest/index.html) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fswag%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/swag/latest/index.html)
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. It also contains fail2ban for intrusion prevention. 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.
[![swag](https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/swag.gif)](https://linuxserver.io) [![swag](https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/swag.gif)](https://linuxserver.io)
@@ -81,6 +81,7 @@ services:
- URL=yourdomain.url - URL=yourdomain.url
- SUBDOMAINS=www, - SUBDOMAINS=www,
- VALIDATION=http - VALIDATION=http
- CERTPROVIDER= #optional
- DNSPLUGIN=cloudflare #optional - DNSPLUGIN=cloudflare #optional
- PROPAGATION= #optional - PROPAGATION= #optional
- DUCKDNSTOKEN= #optional - DUCKDNSTOKEN= #optional
@@ -109,6 +110,7 @@ docker run -d \
-e URL=yourdomain.url \ -e URL=yourdomain.url \
-e SUBDOMAINS=www, \ -e SUBDOMAINS=www, \
-e VALIDATION=http \ -e VALIDATION=http \
-e CERTPROVIDER= `#optional` \
-e DNSPLUGIN=cloudflare `#optional` \ -e DNSPLUGIN=cloudflare `#optional` \
-e PROPAGATION= `#optional` \ -e PROPAGATION= `#optional` \
-e DUCKDNSTOKEN= `#optional` \ -e DUCKDNSTOKEN= `#optional` \
@@ -139,10 +141,11 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e URL=yourdomain.url` | Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). | | `-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 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 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 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 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`, `hetzner`, `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 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 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. | | `-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 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 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 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. |
@@ -223,7 +226,7 @@ This will *ask* Google et al not to index and list your site. Be careful with th
1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/` 1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/`
2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-le-config/etc:/le-ssl`) and in the other containers, use the cert location `/le-ssl/letsencrypt/live/<your.domain.url>/` (This is more secure because the first method shares the entire SWAG config folder with other containers, including the www files, whereas the second method only shares the ssl certs) 2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-le-config/etc:/le-ssl`) and in the other containers, use the cert location `/le-ssl/letsencrypt/live/<your.domain.url>/` (This is more secure because the first method shares the entire SWAG config folder with other containers, including the www files, whereas the second method only shares the ssl certs)
* These certs include: * These certs include:
1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Let's Encrypt and used by nginx and various other apps 1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password) 2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC 3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
### Using fail2ban ### Using fail2ban
@@ -323,7 +326,13 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **03.01.21:** - Add helper pages to aid troubleshooting * **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 * **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. * **09.12.20:** - Check for template/conf updates and notify in the log. Add support for gehirn and sakuracloud dns validation.
* **01.11.20:** - Add support for netcup dns validation * **01.11.20:** - Add support for netcup dns validation

View File

@@ -1,220 +1,223 @@
alpine-baselayout-3.2.0-r7 alpine-baselayout-3.2.0-r8
alpine-keys-2.2-r0 alpine-keys-2.2-r0
apache2-utils-2.4.46-r1 apache2-utils-2.4.46-r3
apk-tools-2.10.5-r1 apk-tools-2.12.1-r0
apr-1.7.0-r0 apr-1.7.0-r0
apr-util-1.6.1-r6 apr-util-1.6.1-r7
argon2-libs-20190702-r1 argon2-libs-20190702-r1
bash-5.0.17-r0 bash-5.1.0-r0
brotli-libs-1.0.9-r1 brotli-libs-1.0.9-r3
busybox-1.31.1-r19 busybox-1.32.1-r3
c-client-2007f-r11 c-client-2007f-r11
ca-certificates-20191127-r4 ca-certificates-20191127-r5
ca-certificates-bundle-20191127-r4 ca-certificates-bundle-20191127-r5
coreutils-8.32-r0 coreutils-8.32-r2
curl-7.69.1-r3 curl-7.74.0-r0
db-5.3.28-r1 expat-2.2.10-r1
expat-2.2.9-r1 fail2ban-0.11.1-r4
fail2ban-0.11.1-r3 freetype-2.10.4-r1
freetype-2.10.4-r0 gdbm-1.19-r0
gdbm-1.13-r1 git-2.30.1-r0
git-2.26.2-r0 git-perl-2.30.1-r0
git-perl-2.26.2-r0 glib-2.66.7-r0
glib-2.64.6-r0 gmp-6.2.1-r0
gmp-6.2.0-r0 gnupg-2.2.27-r0
gnupg-2.2.23-r0 gnutls-3.7.0-r0
gnutls-3.6.15-r0 icu-libs-67.1-r2
icu-libs-67.1-r0 ip6tables-1.8.6-r0
ip6tables-1.8.4-r2 iptables-1.8.6-r0
iptables-1.8.4-r2
libacl-2.2.53-r0 libacl-2.2.53-r0
libassuan-2.5.3-r0 libassuan-2.5.4-r0
libattr-2.4.48-r0 libattr-2.4.48-r0
libblkid-2.35.2-r0 libblkid-2.36.1-r1
libbsd-0.10.0-r0 libbsd-0.10.0-r0
libbz2-1.0.8-r1 libbz2-1.0.8-r1
libc-utils-0.7.2-r3 libc-utils-0.7.2-r3
libcap-2.27-r0 libcap-2.46-r0
libcrypto1.1-1.1.1i-r0 libcrypto1.1-1.1.1i-r0
libcurl-7.69.1-r3 libcurl-7.74.0-r0
libedit-20191231.3.1-r0 libedit-20191231.3.1-r1
libevent-2.1.11-r1 libevent-2.1.12-r1
libffi-3.3-r2 libffi-3.3-r2
libgcc-9.3.0-r2 libgcc-10.2.1_pre1-r3
libgcrypt-1.8.5-r0 libgcrypt-1.8.7-r0
libgd-2.3.0-r1 libgd-2.3.0-r2
libgpg-error-1.37-r0 libgpg-error-1.41-r0
libice-1.0.10-r0 libice-1.0.10-r0
libidn-1.35-r0 libidn-1.35-r0
libintl-0.20.2-r0 libintl-0.20.2-r2
libjpeg-turbo-2.0.5-r0 libjpeg-turbo-2.0.6-r0
libksba-1.4.0-r0 libksba-1.5.0-r0
libldap-2.4.50-r1 libldap-2.4.56-r0
libmagic-5.38-r0 libmagic-5.39-r0
libmaxminddb-1.4.3-r0 libmaxminddb-1.5.0-r1
libmcrypt-2.5.8-r8 libmcrypt-2.5.8-r9
libmemcached-libs-1.0.18-r4 libmemcached-libs-1.0.18-r4
libmnl-1.0.4-r0 libmnl-1.0.4-r1
libmount-2.35.2-r0 libmount-2.36.1-r1
libnftnl-libs-1.1.6-r0 libnftnl-libs-1.1.8-r0
libpng-1.6.37-r1 libpng-1.6.37-r1
libpq-12.5-r0 libpq-13.1-r2
libproc-3.3.16-r0 libproc-3.3.16-r0
libressl3.1-libcrypto-3.1.2-r0 libressl3.1-libcrypto-3.1.5-r0
libressl3.1-libssl-3.1.2-r0 libressl3.1-libssl-3.1.5-r0
libsasl-2.1.27-r6 libsasl-2.1.27-r10
libseccomp-2.4.3-r0 libseccomp-2.5.1-r0
libsecret-0.20.3-r0 libsecret-0.20.4-r0
libsm-1.2.3-r0 libsm-1.2.3-r0
libsodium-1.0.18-r0 libsodium-1.0.18-r0
libssl1.1-1.1.1i-r0 libssl1.1-1.1.1i-r0
libstdc++-9.3.0-r2 libstdc++-10.2.1_pre1-r3
libtasn1-4.16.0-r1 libtasn1-4.16.0-r1
libtls-standalone-2.9.1-r1 libtls-standalone-2.9.1-r1
libunistring-0.9.10-r0 libunistring-0.9.10-r0
libuuid-2.35.2-r0 libuuid-2.36.1-r1
libwebp-1.1.0-r0 libwebp-1.1.0-r0
libx11-1.6.12-r0 libx11-1.7.0-r0
libxau-1.0.9-r0 libxau-1.0.9-r0
libxcb-1.14-r1 libxcb-1.14-r1
libxdmcp-1.1.3-r0 libxdmcp-1.1.3-r0
libxext-1.3.4-r0 libxext-1.3.4-r0
libxml2-2.9.10-r5 libxml2-2.9.10-r6
libxpm-3.5.13-r0 libxpm-3.5.13-r0
libxslt-1.1.34-r0 libxslt-1.1.34-r0
libxt-1.2.0-r0 libxt-1.2.1-r0
libzip-1.6.1-r1 libzip-1.7.3-r2
linux-pam-1.3.1-r4 linux-pam-1.5.1-r0
logrotate-3.16.0-r0 logrotate-3.18.0-r0
luajit-5.1.20190925-r0 lz4-libs-1.9.2-r0
memcached-1.6.6-r0 memcached-1.6.9-r0
musl-1.1.24-r10 musl-1.2.2-r0
musl-utils-1.1.24-r10 musl-utils-1.2.2-r0
nano-4.9.3-r0 nano-5.4-r1
ncurses-libs-6.2_p20200523-r0 ncurses-libs-6.2_p20210109-r0
ncurses-terminfo-base-6.2_p20200523-r0 ncurses-terminfo-base-6.2_p20210109-r0
nettle-3.5.1-r1 nettle-3.7-r0
nghttp2-libs-1.41.0-r0 nghttp2-libs-1.42.0-r1
nginx-1.18.0-r1 nginx-1.18.0-r13
nginx-mod-devel-kit-1.18.0-r1 nginx-mod-devel-kit-1.18.0-r13
nginx-mod-http-echo-1.18.0-r1 nginx-mod-http-brotli-1.18.0-r13
nginx-mod-http-fancyindex-1.18.0-r1 nginx-mod-http-dav-ext-1.18.0-r13
nginx-mod-http-geoip2-1.18.0-r1 nginx-mod-http-echo-1.18.0-r13
nginx-mod-http-headers-more-1.18.0-r1 nginx-mod-http-fancyindex-1.18.0-r13
nginx-mod-http-image-filter-1.18.0-r1 nginx-mod-http-geoip2-1.18.0-r13
nginx-mod-http-lua-1.18.0-r1 nginx-mod-http-headers-more-1.18.0-r13
nginx-mod-http-lua-upstream-1.18.0-r1 nginx-mod-http-image-filter-1.18.0-r13
nginx-mod-http-nchan-1.18.0-r1 nginx-mod-http-nchan-1.18.0-r13
nginx-mod-http-perl-1.18.0-r1 nginx-mod-http-perl-1.18.0-r13
nginx-mod-http-redis2-1.18.0-r1 nginx-mod-http-redis2-1.18.0-r13
nginx-mod-http-set-misc-1.18.0-r1 nginx-mod-http-set-misc-1.18.0-r13
nginx-mod-http-upload-progress-1.18.0-r1 nginx-mod-http-upload-progress-1.18.0-r13
nginx-mod-http-xslt-filter-1.18.0-r1 nginx-mod-http-xslt-filter-1.18.0-r13
nginx-mod-mail-1.18.0-r1 nginx-mod-mail-1.18.0-r13
nginx-mod-rtmp-1.18.0-r1 nginx-mod-rtmp-1.18.0-r13
nginx-mod-stream-1.18.0-r1 nginx-mod-stream-1.18.0-r13
nginx-mod-stream-geoip2-1.18.0-r1 nginx-mod-stream-geoip2-1.18.0-r13
nginx-vim-1.18.0-r1 nginx-vim-1.18.0-r13
npth-1.6-r0 npth-1.6-r0
oniguruma-6.9.6-r0
openssl-1.1.1i-r0 openssl-1.1.1i-r0
p11-kit-0.23.22-r0 p11-kit-0.23.22-r0
pcre-8.44-r0 pcre-8.44-r0
pcre2-10.35-r0 pcre2-10.36-r0
perl-5.30.3-r0 perl-5.32.0-r0
perl-error-0.17029-r0 perl-error-0.17029-r1
perl-git-2.26.2-r0 perl-git-2.30.1-r0
php7-7.3.26-r0 php7-7.4.15-r0
php7-bcmath-7.3.26-r0 php7-bcmath-7.4.15-r0
php7-bz2-7.3.26-r0 php7-bz2-7.4.15-r0
php7-common-7.3.26-r0 php7-common-7.4.15-r0
php7-ctype-7.3.26-r0 php7-ctype-7.4.15-r0
php7-curl-7.3.26-r0 php7-curl-7.4.15-r0
php7-dom-7.3.26-r0 php7-dom-7.4.15-r0
php7-exif-7.3.26-r0 php7-exif-7.4.15-r0
php7-fileinfo-7.3.25-r0 php7-fileinfo-7.4.15-r0
php7-fpm-7.3.25-r0 php7-fpm-7.4.15-r0
php7-ftp-7.3.26-r0 php7-ftp-7.4.15-r0
php7-gd-7.3.26-r0 php7-gd-7.4.15-r0
php7-iconv-7.3.26-r0 php7-iconv-7.4.15-r0
php7-imap-7.3.26-r0 php7-imap-7.4.15-r0
php7-intl-7.3.26-r0 php7-intl-7.4.15-r0
php7-json-7.3.26-r0 php7-json-7.4.15-r0
php7-ldap-7.3.26-r0 php7-ldap-7.4.15-r0
php7-mbstring-7.3.26-r0 php7-mbstring-7.4.15-r0
php7-mysqli-7.3.26-r0 php7-mysqli-7.4.15-r0
php7-mysqlnd-7.3.26-r0 php7-mysqlnd-7.4.15-r0
php7-opcache-7.3.26-r0 php7-opcache-7.4.15-r0
php7-openssl-7.3.26-r0 php7-openssl-7.4.15-r0
php7-pdo-7.3.26-r0 php7-pdo-7.4.15-r0
php7-pdo_mysql-7.3.26-r0 php7-pdo_mysql-7.4.15-r0
php7-pdo_odbc-7.3.26-r0 php7-pdo_odbc-7.4.15-r0
php7-pdo_pgsql-7.3.26-r0 php7-pdo_pgsql-7.4.15-r0
php7-pdo_sqlite-7.3.26-r0 php7-pdo_sqlite-7.4.15-r0
php7-pear-7.3.26-r0 php7-pear-7.4.15-r0
php7-pecl-apcu-5.1.19-r0 php7-pecl-apcu-5.1.19-r1
php7-pecl-igbinary-3.1.6-r0 php7-pecl-igbinary-3.2.2_rc1-r0
php7-pecl-mcrypt-1.0.3-r0 php7-pecl-mcrypt-1.0.4-r0
php7-pecl-memcached-3.1.5-r0 php7-pecl-memcached-3.1.5-r2
php7-pecl-redis-5.2.2-r1 php7-pecl-redis-5.3.3-r0
php7-pgsql-7.3.26-r0 php7-pgsql-7.4.15-r0
php7-phar-7.3.26-r0 php7-phar-7.4.15-r0
php7-posix-7.3.26-r0 php7-posix-7.4.15-r0
php7-session-7.3.26-r0 php7-session-7.4.15-r0
php7-simplexml-7.3.25-r0 php7-simplexml-7.4.15-r0
php7-soap-7.3.26-r0 php7-soap-7.4.15-r0
php7-sockets-7.3.26-r0 php7-sockets-7.4.15-r0
php7-sodium-7.3.26-r0 php7-sodium-7.4.15-r0
php7-sqlite3-7.3.26-r0 php7-sqlite3-7.4.15-r0
php7-tokenizer-7.3.26-r0 php7-tokenizer-7.4.15-r0
php7-xml-7.3.26-r0 php7-xml-7.4.15-r0
php7-xmlreader-7.3.26-r0 php7-xmlreader-7.4.15-r0
php7-xmlrpc-7.3.26-r0 php7-xmlrpc-7.4.15-r0
php7-xmlwriter-7.3.25-r0 php7-xmlwriter-7.4.15-r0
php7-xsl-7.3.26-r0 php7-xsl-7.4.15-r0
php7-zip-7.3.26-r0 php7-zip-7.4.15-r0
pinentry-1.1.0-r2 pinentry-1.1.1-r0
popt-1.16-r7 popt-1.18-r0
procps-3.3.16-r0 procps-3.3.16-r0
py3-appdirs-1.4.4-r1 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-cachecontrol-0.12.6-r0
py3-certifi-2020.4.5.1-r0 py3-cffi-1.14.4-r0
py3-cffi-1.14.0-r2 py3-chardet-4.0.0-r0
py3-chardet-3.0.4-r4 py3-colorama-0.4.4-r0
py3-colorama-0.4.3-r0
py3-contextlib2-0.6.0-r0 py3-contextlib2-0.6.0-r0
py3-cparser-2.20-r0 py3-cparser-2.20-r0
py3-cryptography-2.9.2-r0 py3-cryptography-3.3.2-r0
py3-distlib-0.3.0-r0 py3-distlib-0.3.1-r1
py3-distro-1.5.0-r1 py3-distro-1.5.0-r1
py3-future-0.18.2-r1 py3-future-0.18.2-r1
py3-html5lib-1.0.1-r4 py3-html5lib-1.1-r0
py3-idna-2.9-r0 py3-idna-3.1-r0
py3-lockfile-0.12.2-r3 py3-lockfile-0.12.2-r3
py3-msgpack-1.0.0-r0 py3-msgpack-1.0.2-r0
py3-ordered-set-4.0.1-r0 py3-ordered-set-4.0.2-r0
py3-packaging-20.4-r0 py3-packaging-20.9-r0
py3-parsing-2.4.7-r0 py3-parsing-2.4.7-r1
py3-pep517-0.8.2-r0 py3-pep517-0.9.1-r0
py3-pip-20.1.1-r0 py3-pip-20.3.4-r0
py3-progress-1.5-r0 py3-progress-1.5-r0
py3-pytoml-0.1.21-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-retrying-1.3.3-r0
py3-setuptools-47.0.0-r0 py3-setuptools-51.3.3-r0
py3-six-1.15.0-r0 py3-six-1.15.0-r0
py3-toml-0.10.1-r0 py3-toml-0.10.2-r0
py3-urllib3-1.25.9-r0 py3-urllib3-1.26.2-r1
py3-webencodings-0.5.1-r3 py3-webencodings-0.5.1-r3
python3-3.8.5-r0 python3-3.8.7-r0
readline-8.0.4-r0 readline-8.1.0-r0
scanelf-1.2.6-r0 s6-ipcserver-2.10.0.0-r0
scanelf-1.2.8-r0
shadow-4.8.1-r0 shadow-4.8.1-r0
sqlite-libs-3.32.1-r0 skalibs-2.10.0.0-r0
ssl_client-1.31.1-r19 sqlite-libs-3.34.1-r0
tzdata-2020c-r1 ssl_client-1.32.1-r3
unixodbc-2.3.7-r2 tzdata-2021a-r0
whois-5.5.6-r0 unixodbc-2.3.9-r1
utmps-0.1.0.0-r0
whois-5.5.7-r1
xz-5.2.5-r0 xz-5.2.5-r0
xz-libs-5.2.5-r0 xz-libs-5.2.5-r0
zlib-1.2.11-r3 zlib-1.2.11-r3
zstd-libs-1.4.5-r3

View File

@@ -4,7 +4,7 @@
project_name: swag project_name: swag
project_url: "https://linuxserver.io" project_url: "https://linuxserver.io"
project_logo: "https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/swag.gif" project_logo: "https://github.com/linuxserver/docker-templates/raw/master/linuxserver.io/img/swag.gif"
project_blurb: "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. It also contains fail2ban for intrusion prevention." project_blurb: "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."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
project_blurb_optional_extras_enabled: false project_blurb_optional_extras_enabled: false
@@ -50,10 +50,11 @@ cap_add_param_vars:
# optional container parameters # optional container parameters
opt_param_usage_include_env: true opt_param_usage_include_env: true
opt_param_env_vars: opt_param_env_vars:
- { 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: "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`, `hetzner`, `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: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." } - { 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: "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." } - { env_var: "EMAIL", env_value: "", desc: "Optional e-mail address used for cert expiration notifications (Required for ZeroSSL)." }
- { env_var: "ONLY_SUBDOMAINS", env_value: "false", desc: "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`" } - { env_var: "ONLY_SUBDOMAINS", env_value: "false", desc: "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`" }
- { env_var: "EXTRA_DOMAINS", env_value: "", desc: "Additional fully qualified domain names (comma separated, no spaces) ie. `extradomain.com,subdomain.anotherdomain.org,*.anotherdomain.org`" } - { env_var: "EXTRA_DOMAINS", env_value: "", desc: "Additional fully qualified domain names (comma separated, no spaces) ie. `extradomain.com,subdomain.anotherdomain.org,*.anotherdomain.org`" }
- { env_var: "STAGING", env_value: "false", desc: "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." } - { env_var: "STAGING", env_value: "false", desc: "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." }
@@ -117,7 +118,7 @@ app_setup_block: |
1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/` 1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-le-config:/le-ssl`) and in the other containers, use the cert location `/le-ssl/keys/letsencrypt/`
2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-le-config/etc:/le-ssl`) and in the other containers, use the cert location `/le-ssl/letsencrypt/live/<your.domain.url>/` (This is more secure because the first method shares the entire SWAG config folder with other containers, including the www files, whereas the second method only shares the ssl certs) 2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-le-config/etc:/le-ssl`) and in the other containers, use the cert location `/le-ssl/letsencrypt/live/<your.domain.url>/` (This is more secure because the first method shares the entire SWAG config folder with other containers, including the www files, whereas the second method only shares the ssl certs)
* These certs include: * These certs include:
1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Let's Encrypt and used by nginx and various other apps 1. `cert.pem`, `chain.pem`, `fullchain.pem` and `privkey.pem`, which are generated by Certbot and used by nginx and various other apps
2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password) 2. `privkey.pfx`, a format supported by Microsoft and commonly used by dotnet apps such as Emby Server (no password)
3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC 3. `priv-fullchain-bundle.pem`, a pem cert that bundles the private key and the fullchain, used by apps like ZNC
### Using fail2ban ### Using fail2ban
@@ -150,7 +151,13 @@ app_setup_nginx_reverse_proxy_block: ""
# changelog # changelog
changelogs: changelogs:
- { date: "03.01.21:", desc: "Add helper pages to aid troubleshooting" } - { 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: "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." } - { date: "09.12.20:", desc: "Check for template/conf updates and notify in the log. Add support for gehirn and sakuracloud dns validation." }
- { date: "01.11.20:", desc: "Add support for netcup dns validation" } - { date: "01.11.20:", desc: "Add support for netcup dns validation" }

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
. /config/donoteditthisfile.conf . /config/.donoteditthisfile.conf
curl https://www.duckdns.org/update?domains=${CERTBOT_DOMAIN}\&token=${ORIGDUCKDNSTOKEN}\&txt=${CERTBOT_VALIDATION} curl https://www.duckdns.org/update?domains=${CERTBOT_DOMAIN}\&token=${ORIGDUCKDNSTOKEN}\&txt=${CERTBOT_VALIDATION}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
. /config/donoteditthisfile.conf . /config/.donoteditthisfile.conf
echo "<------------------------------------------------->" echo "<------------------------------------------------->"
echo echo

View File

@@ -2,5 +2,5 @@
# https://ram.console.aliyun.com/ # https://ram.console.aliyun.com/
# And ensure your RAM account has AliyunDNSFullAccess permission. # And ensure your RAM account has AliyunDNSFullAccess permission.
certbot_dns_aliyun:dns_aliyun_access_key = 12345678 dns_aliyun_access_key = 12345678
certbot_dns_aliyun:dns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef dns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef

View File

@@ -1,4 +1,4 @@
# Instructions: https://github.com/domeneshop/certbot-dns-domeneshop#credentials # Instructions: https://github.com/domeneshop/certbot-dns-domeneshop#credentials
# Replace with your values # Replace with your values
certbot_dns_domeneshop:dns_domeneshop_client_token=1234567890abcdef dns_domeneshop_client_token=1234567890abcdef
certbot_dns_domeneshop:dns_domeneshop_client_secret=1234567890abcdefghijklmnopqrstuvxyz1234567890abcdefghijklmnopqrs dns_domeneshop_client_secret=1234567890abcdefghijklmnopqrstuvxyz1234567890abcdefghijklmnopqrs

View File

@@ -0,0 +1,3 @@
# Instructions: https://github.com/ctrlaltcoop/certbot-dns-hetzner
# Replace with your values
dns_hetzner_api_token = nohnah4zoo9Kiejee9aGh0thoopee2sa

View File

@@ -1,6 +1,6 @@
# Instructions: https://github.com/oGGy990/certbot-dns-inwx # Instructions: https://github.com/oGGy990/certbot-dns-inwx
# Replace with your values # Replace with your values
certbot_dns_inwx:dns_inwx_url = https://api.domrobot.com/xmlrpc/ dns_inwx_url = https://api.domrobot.com/xmlrpc/
certbot_dns_inwx:dns_inwx_username = your_username dns_inwx_username = your_username
certbot_dns_inwx:dns_inwx_password = your_password dns_inwx_password = your_password
certbot_dns_inwx:dns_inwx_shared_secret = your_shared_secret optional dns_inwx_shared_secret = your_shared_secret optional

View File

@@ -1,6 +1,30 @@
# Instructions: https://readthedocs.org/projects/certbot-dns-transip/ # 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
certbot_dns_transip:dns_transip_username = <transip_username>
certbot_dns_transip:dns_transip_key_file = /config/dns-conf/transip-rsa.key

View File

@@ -1,4 +1,4 @@
## Version 2020/10/04 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf ## Version 2021/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
user abc; user abc;
worker_processes 4; worker_processes 4;
@@ -85,7 +85,7 @@ http {
## ##
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
include /config/nginx/site-confs/*; include /config/nginx/site-confs/*;
lua_load_resty_core off; #Removed lua. Do not remove this comment
## ##
# Geoip2 config # Geoip2 config

View File

@@ -10,6 +10,7 @@ SUBDOMAINS=${SUBDOMAINS}\\n\
EXTRA_DOMAINS=${EXTRA_DOMAINS}\\n\ EXTRA_DOMAINS=${EXTRA_DOMAINS}\\n\
ONLY_SUBDOMAINS=${ONLY_SUBDOMAINS}\\n\ ONLY_SUBDOMAINS=${ONLY_SUBDOMAINS}\\n\
VALIDATION=${VALIDATION}\\n\ VALIDATION=${VALIDATION}\\n\
CERTPROVIDER=${CERTPROVIDER}\\n\
DNSPLUGIN=${DNSPLUGIN}\\n\ DNSPLUGIN=${DNSPLUGIN}\\n\
EMAIL=${EMAIL}\\n\ EMAIL=${EMAIL}\\n\
STAGING=${STAGING}\\n" STAGING=${STAGING}\\n"
@@ -20,7 +21,7 @@ if [ -n "${TEST_RUN}" ]; then
fi fi
# Sanitize variables # Sanitize variables
SANED_VARS=( DNSPLUGIN EMAIL EXTRA_DOMAINS ONLY_SUBDOMAINS STAGING SUBDOMAINS URL VALIDATION ) SANED_VARS=( DNSPLUGIN EMAIL EXTRA_DOMAINS ONLY_SUBDOMAINS STAGING SUBDOMAINS URL VALIDATION CERTPROVIDER )
for i in "${SANED_VARS[@]}" for i in "${SANED_VARS[@]}"
do do
export echo "$i"="${!i//\"/}" export echo "$i"="${!i//\"/}"
@@ -80,6 +81,12 @@ cp /config/fail2ban/jail.local /etc/fail2ban/jail.local
[[ ! -f /config/www/502.html ]] && [[ ! -f /config/www/502.html ]] &&
cp /defaults/502.html /config/www/502.html cp /defaults/502.html /config/www/502.html
# 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
# copy pre-generated dhparams or generate if needed # copy pre-generated dhparams or generate if needed
[[ ! -f /config/nginx/dhparams.pem ]] && \ [[ ! -f /config/nginx/dhparams.pem ]] && \
cp /defaults/dhparams.pem /config/nginx/dhparams.pem cp /defaults/dhparams.pem /config/nginx/dhparams.pem
@@ -92,7 +99,7 @@ if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
fi fi
# check to make sure DNSPLUGIN is selected if dns validation is used # 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)$ ]] && \ [[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|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." && \ echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
sleep infinity sleep infinity
@@ -100,15 +107,18 @@ fi
rm /etc/crontabs/* rm /etc/crontabs/*
cp /config/crontabs/* /etc/crontabs/ cp /config/crontabs/* /etc/crontabs/
# create original config file if it doesn't exist # create original config file if it doesn't exist, move non-hidden legacy file to hidden
if [ ! -f "/config/donoteditthisfile.conf" ]; then 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\"" > /config/donoteditthisfile.conf mv /config/donoteditthisfile.conf /config/.donoteditthisfile.conf
echo "Created 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"
fi fi
# load original config settings # load original config settings
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. /config/donoteditthisfile.conf . /config/.donoteditthisfile.conf
# set default validation to http # set default validation to http
if [ -z "$VALIDATION" ]; then if [ -z "$VALIDATION" ]; then
@@ -116,11 +126,22 @@ if [ -z "$VALIDATION" ]; then
echo "VALIDATION parameter not set; setting it to http" echo "VALIDATION parameter not set; setting it to http"
fi fi
# if staging is set to true, use the staging server # if zerossl is selected or staging is set to true, use the relevant server
if [ "$STAGING" = "true" ]; then if [ "$CERTPROVIDER" = "zerossl" ] && [ "$STAGING" = "true" ]; then
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"
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
elif [ "$STAGING" = "true" ]; then
echo "NOTICE: Staging is active" echo "NOTICE: Staging is active"
echo "Using Let's Encrypt as the cert provider"
ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory" ACMESERVER="https://acme-staging-v02.api.letsencrypt.org/directory"
else else
echo "Using Let's Encrypt as the cert provider"
ACMESERVER="https://acme-v02.api.letsencrypt.org/directory" ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
fi fi
@@ -172,6 +193,12 @@ else
EMAILPARAM="--register-unsafely-without-email" EMAILPARAM="--register-unsafely-without-email"
fi fi
# update plugin names in dns conf inis
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 # setting the validation method to use
if [ "$VALIDATION" = "dns" ]; then if [ "$VALIDATION" = "dns" ]; then
if [ "$DNSPLUGIN" = "route53" ]; then if [ "$DNSPLUGIN" = "route53" ]; then
@@ -186,10 +213,7 @@ if [ "$VALIDATION" = "dns" ]; then
elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}" PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json ${PROPAGATIONPARAM}"
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|inwx|transip)$ ]]; then elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|hetzner|inwx|netcup|njalla|transip)$ ]]; then
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
elif [[ "$DNSPLUGIN" =~ ^(netcup|njalla)$ ]]; then
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}" PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
else else
@@ -226,20 +250,34 @@ else
fi fi
# checking for changes in cert variables, revoking certs if necessary # 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" ]; then 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" 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 if [ "$ORIGONLY_SUBDOMAINS" = "true" ] && [ ! "$ORIGSUBDOMAINS" = "wildcard" ]; then
ORIGDOMAIN="$(echo "$ORIGSUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${ORIGURL}" ORIGDOMAIN="$(echo "$ORIGSUBDOMAINS" | tr ',' ' ' | awk '{print $1}').${ORIGURL}"
[[ -f /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem ]] && certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem
else else
[[ -f /config/etc/letsencrypt/live/"$ORIGURL"/fullchain.pem ]] && certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGURL"/fullchain.pem ORIGDOMAIN="$ORIGURL"
fi 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 rm -rf /config/etc/letsencrypt
mkdir -p /config/etc/letsencrypt mkdir -p /config/etc/letsencrypt
fi fi
# saving new variables # saving new variables
echo -e "ORIGURL=\"$URL\" ORIGSUBDOMAINS=\"$SUBDOMAINS\" ORIGONLY_SUBDOMAINS=\"$ONLY_SUBDOMAINS\" ORIGEXTRA_DOMAINS=\"$EXTRA_DOMAINS\" ORIGVALIDATION=\"$VALIDATION\" ORIGDNSPLUGIN=\"$DNSPLUGIN\" ORIGPROPAGATION=\"$PROPAGATION\" ORIGSTAGING=\"$STAGING\" ORIGDUCKDNSTOKEN=\"$DUCKDNSTOKEN\"" > /config/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
# alter extension for error message # alter extension for error message
if [ "$DNSPLUGIN" = "google" ]; then if [ "$DNSPLUGIN" = "google" ]; then
@@ -250,9 +288,20 @@ fi
# generating certs if necessary # generating certs if necessary
if [ ! -f "/config/keys/letsencrypt/fullchain.pem" ]; then 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'])")
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
echo "Generating new certificate" echo "Generating new certificate"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
certbot certonly --renew-by-default --server $ACMESERVER $PREFCHAL --rsa-key-size 4096 $EMAILPARAM --agree-tos $URL_REAL 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 if [ -d /config/keys/letsencrypt ]; then
cd /config/keys/letsencrypt || exit cd /config/keys/letsencrypt || exit
else else

View File

@@ -24,7 +24,7 @@ if [ -n "$nginx_confs_changed" ]; then
echo -e "${nginx_confs_changed}" echo -e "${nginx_confs_changed}"
fi fi
proxy_confs=$(ls /config/nginx/proxy-confs/*.conf) proxy_confs=$(ls /config/nginx/proxy-confs/*.conf 2>/dev/null)
for i in $proxy_confs; do for i in $proxy_confs; do
if [ -f "${i}.sample" ]; then if [ -f "${i}.sample" ]; then