mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-03-03 00:43:34 +09:00
Compare commits
110 Commits
1.20.0-ls9
...
1.29.0-ls1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f23d9fbeff | ||
|
|
e6628f05c3 | ||
|
|
f8ee44ca8d | ||
|
|
a5d730d298 | ||
|
|
e22a083d7a | ||
|
|
a2371253a7 | ||
|
|
4864761b54 | ||
|
|
3d70935ecf | ||
|
|
e5b672e52b | ||
|
|
1adf35b5df | ||
|
|
c279c173b3 | ||
|
|
8ed7c7ee28 | ||
|
|
1f42c02a4a | ||
|
|
37b5af4856 | ||
|
|
016dc18007 | ||
|
|
dd034ef3c1 | ||
|
|
0069f887a7 | ||
|
|
623e99c6ab | ||
|
|
996d3b26df | ||
|
|
252d57cf34 | ||
|
|
4b486b547c | ||
|
|
ef95db397b | ||
|
|
0bb1f55280 | ||
|
|
5df55cc0c0 | ||
|
|
ceabef087f | ||
|
|
6f9ed0721d | ||
|
|
5319c88dfa | ||
|
|
c875b69297 | ||
|
|
3893db4077 | ||
|
|
f8e4eca8d0 | ||
|
|
ee6a7d454f | ||
|
|
f29ae615d4 | ||
|
|
a9fd11ff77 | ||
|
|
60c0da359b | ||
|
|
bec249ba73 | ||
|
|
eb7df9d9fc | ||
|
|
a29f2da10e | ||
|
|
a9e53d5fc8 | ||
|
|
f9e05fd86a | ||
|
|
b28eed1263 | ||
|
|
7eb8f7999e | ||
|
|
5beb4ffb32 | ||
|
|
9821740d65 | ||
|
|
5501308aed | ||
|
|
2272c3037a | ||
|
|
cf8cfd4241 | ||
|
|
a5389c3f40 | ||
|
|
1fbae23bcf | ||
|
|
de3b43cb62 | ||
|
|
555b2837cb | ||
|
|
7c5005f9ad | ||
|
|
7fb7364c96 | ||
|
|
274369c4ba | ||
|
|
7562a1c26a | ||
|
|
7d6b5e66c1 | ||
|
|
6fde2f5f8f | ||
|
|
08d0680a0c | ||
|
|
665eace79f | ||
|
|
51d6132d63 | ||
|
|
251917b23f | ||
|
|
bedff470cf | ||
|
|
84cdf58b66 | ||
|
|
e843b50fc8 | ||
|
|
1ff4691000 | ||
|
|
682689d0fc | ||
|
|
29a92e6bf1 | ||
|
|
119df9f88b | ||
|
|
4929672e62 | ||
|
|
522fed5d1b | ||
|
|
7b2dab1fbf | ||
|
|
2878d84050 | ||
|
|
3b0095bdec | ||
|
|
4989825cb0 | ||
|
|
96e0fc7838 | ||
|
|
6f3a967360 | ||
|
|
671d51a345 | ||
|
|
2a9294a1db | ||
|
|
a001fd849b | ||
|
|
f617df2ba7 | ||
|
|
0952b6eb3e | ||
|
|
cb5a367323 | ||
|
|
85efd12ba4 | ||
|
|
df1ba1c60a | ||
|
|
5f526e4f89 | ||
|
|
f9090d4a50 | ||
|
|
48f6b00530 | ||
|
|
146687121e | ||
|
|
f307dbbfb7 | ||
|
|
93ba4f18b1 | ||
|
|
ce544dd810 | ||
|
|
411970a947 | ||
|
|
7ea16018d5 | ||
|
|
8a4af00f01 | ||
|
|
fee6fe9a17 | ||
|
|
bf21716886 | ||
|
|
0d5f7b24b8 | ||
|
|
637ddc29a5 | ||
|
|
9b169f5da2 | ||
|
|
71cda1f685 | ||
|
|
08c23bde51 | ||
|
|
0109a07cfb | ||
|
|
0ce2ae551a | ||
|
|
00fde50825 | ||
|
|
69649d102f | ||
|
|
66a4c1203b | ||
|
|
c40c2bd6e5 | ||
|
|
11302bce96 | ||
|
|
537c47f293 | ||
|
|
d65b388b9f | ||
|
|
ed3402fe51 |
13
Dockerfile
13
Dockerfile
@@ -101,20 +101,26 @@ RUN \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-azure \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-desec \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-dnspod \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-dynu \
|
||||
certbot-dns-google \
|
||||
certbot-dns-he \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-infomaniak \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-ionos \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-loopia \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
@@ -122,11 +128,18 @@ RUN \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-standalone \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-dns-desec \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** correct ip6tables legacy issue ****" && \
|
||||
rm \
|
||||
/sbin/ip6tables && \
|
||||
ln -s \
|
||||
/sbin/ip6tables-nft /sbin/ip6tables && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
|
||||
@@ -101,20 +101,26 @@ RUN \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-azure \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-desec \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-dnspod \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-dynu \
|
||||
certbot-dns-google \
|
||||
certbot-dns-he \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-infomaniak \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-ionos \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-loopia \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
@@ -122,11 +128,18 @@ RUN \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-standalone \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-dns-desec \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** correct ip6tables legacy issue ****" && \
|
||||
rm \
|
||||
/sbin/ip6tables && \
|
||||
ln -s \
|
||||
/sbin/ip6tables-nft /sbin/ip6tables && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
|
||||
@@ -101,20 +101,26 @@ RUN \
|
||||
pip3 install -U --find-links https://wheel-index.linuxserver.io/alpine/ \
|
||||
${CERTBOT} \
|
||||
certbot-dns-aliyun \
|
||||
certbot-dns-azure \
|
||||
certbot-dns-cloudflare \
|
||||
certbot-dns-cloudxns \
|
||||
certbot-dns-cpanel \
|
||||
certbot-dns-desec \
|
||||
certbot-dns-digitalocean \
|
||||
certbot-dns-directadmin \
|
||||
certbot-dns-dnsimple \
|
||||
certbot-dns-dnsmadeeasy \
|
||||
certbot-dns-dnspod \
|
||||
certbot-dns-domeneshop \
|
||||
certbot-dns-dynu \
|
||||
certbot-dns-google \
|
||||
certbot-dns-he \
|
||||
certbot-dns-hetzner \
|
||||
certbot-dns-infomaniak \
|
||||
certbot-dns-inwx \
|
||||
certbot-dns-ionos \
|
||||
certbot-dns-linode \
|
||||
certbot-dns-loopia \
|
||||
certbot-dns-luadns \
|
||||
certbot-dns-netcup \
|
||||
certbot-dns-njalla \
|
||||
@@ -122,11 +128,17 @@ RUN \
|
||||
certbot-dns-ovh \
|
||||
certbot-dns-rfc2136 \
|
||||
certbot-dns-route53 \
|
||||
certbot-dns-standalone \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** correct ip6tables legacy issue ****" && \
|
||||
rm \
|
||||
/sbin/ip6tables && \
|
||||
ln -s \
|
||||
/sbin/ip6tables-nft /sbin/ip6tables && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
rm \
|
||||
/etc/fail2ban/jail.d/alpine-ssh.conf && \
|
||||
|
||||
96
Jenkinsfile
vendored
96
Jenkinsfile
vendored
@@ -118,12 +118,11 @@ pipeline {
|
||||
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
||||
returnStdout: true).trim()
|
||||
|
||||
env.SEMVER = (new Date()).format('YYYY.MM.dd')
|
||||
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)$/
|
||||
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
|
||||
if (semver.find()) {
|
||||
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||
} else {
|
||||
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)$/
|
||||
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/
|
||||
if (semver.find()) {
|
||||
if (semver[0][3]) {
|
||||
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||
@@ -133,7 +132,15 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
println("SEMVER: ${env.SEMVER}")
|
||||
if (env.SEMVER != null) {
|
||||
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
|
||||
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
|
||||
}
|
||||
println("SEMVER: ${env.SEMVER}")
|
||||
} else {
|
||||
println("No SEMVER detected")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,9 +343,11 @@ pipeline {
|
||||
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, removing Unraid template"
|
||||
git rm unraid/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Removing Deprecated Unraid Template' || :
|
||||
echo "Image is on the ignore list, marking Unraid template as deprecated"
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add -u unraid/${CONTAINER_NAME}.xml
|
||||
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
|
||||
git commit -m 'Bot Moving Deprecated Unraid Template' || :
|
||||
else
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
|
||||
git add unraid/${CONTAINER_NAME}.xml
|
||||
@@ -402,10 +411,10 @@ pipeline {
|
||||
steps{
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/packages | jq -r '.[] | select(.name=="linuxserver/swag") | .uuid')
|
||||
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/swag") | .uuid')
|
||||
if [ -z "${PACKAGE_UUID}" ]; then
|
||||
echo "Adding package to Scarf.sh"
|
||||
PACKAGE_UUID=$(curl -sX POST https://scarf.sh/api/v1/packages \
|
||||
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
|
||||
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"linuxserver/swag",\
|
||||
@@ -413,22 +422,10 @@ pipeline {
|
||||
"libraryType":"docker",\
|
||||
"website":"https://github.com/linuxserver/docker-swag",\
|
||||
"backendUrl":"https://ghcr.io/linuxserver/swag",\
|
||||
"publicUrl":"https://lscr.io/linuxserver/swag"}' \
|
||||
| jq -r .uuid)
|
||||
"publicUrl":"https://lscr.io/linuxserver/swag"}' || :
|
||||
else
|
||||
echo "Package already exists on Scarf.sh"
|
||||
fi
|
||||
echo "Setting permissions on Scarf.sh for package ${PACKAGE_UUID}"
|
||||
curl -X POST https://scarf.sh/api/v1/packages/${PACKAGE_UUID}/permissions \
|
||||
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '[{"userQuery":"Spad","permissionLevel":"admin"},\
|
||||
{"userQuery":"roxedus","permissionLevel":"admin"},\
|
||||
{"userQuery":"nemchik","permissionLevel":"admin"},\
|
||||
{"userQuery":"driz","permissionLevel":"admin"},\
|
||||
{"userQuery":"aptalca","permissionLevel":"admin"},\
|
||||
{"userQuery":"saarg","permissionLevel":"admin"},\
|
||||
{"userQuery":"Stark","permissionLevel":"admin"}]'
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -752,11 +749,15 @@ pipeline {
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
docker push ${PUSHIMAGE}:latest
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
docker push ${PUSHIMAGE}:${SEMVER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
@@ -765,8 +766,10 @@ pipeline {
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:${META_TAG} \
|
||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:latest \
|
||||
${DELETEIMAGE}:${SEMVER} || :
|
||||
${DELETEIMAGE}:latest || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi ${DELETEIMAGE}:${SEMVER} || :
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
@@ -816,9 +819,11 @@ pipeline {
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
@@ -828,9 +833,11 @@ pipeline {
|
||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
||||
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
||||
@@ -843,14 +850,18 @@ pipeline {
|
||||
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||
fi
|
||||
done
|
||||
'''
|
||||
}
|
||||
@@ -860,15 +871,18 @@ pipeline {
|
||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||
${DELETEIMAGE}:amd64-latest \
|
||||
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:amd64-${SEMVER} \
|
||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-latest \
|
||||
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-${SEMVER} \
|
||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-latest \
|
||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-${SEMVER} || :
|
||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:amd64-${SEMVER} \
|
||||
${DELETEIMAGE}:arm32v7-${SEMVER} \
|
||||
${DELETEIMAGE}:arm64v8-${SEMVER} || :
|
||||
fi
|
||||
done
|
||||
docker rmi \
|
||||
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||
|
||||
52
README.md
Normal file → Executable file
52
README.md
Normal file → Executable file
@@ -29,6 +29,7 @@ Find us at:
|
||||
|
||||
# [linuxserver/swag](https://github.com/linuxserver/docker-swag)
|
||||
|
||||
[](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fswag)
|
||||
[](https://github.com/linuxserver/docker-swag)
|
||||
[](https://github.com/linuxserver/docker-swag/releases)
|
||||
[](https://github.com/linuxserver/docker-swag/packages)
|
||||
@@ -45,17 +46,17 @@ SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relatio
|
||||
|
||||
## Supported Architectures
|
||||
|
||||
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
||||
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
||||
|
||||
Simply pulling `lscr.io/linuxserver/swag` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||
Simply pulling `lscr.io/linuxserver/swag:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||
|
||||
The architectures supported by this image are:
|
||||
|
||||
| Architecture | Tag |
|
||||
| :----: | --- |
|
||||
| x86-64 | amd64-latest |
|
||||
| arm64 | arm64v8-latest |
|
||||
| armhf | arm32v7-latest |
|
||||
| Architecture | Available | Tag |
|
||||
| :----: | :----: | ---- |
|
||||
| x86-64 | ✅ | amd64-\<version tag\> |
|
||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||
| armhf| ✅ | arm32v7-\<version tag\> |
|
||||
|
||||
## Application Setup
|
||||
|
||||
@@ -93,8 +94,8 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
|
||||
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
|
||||
* To use these certs in other containers, do either of the following:
|
||||
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)
|
||||
1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-swag-config:/swag-ssl`) and in the other containers, use the cert location `/swag-ssl/keys/letsencrypt/`
|
||||
2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-swag-config/etc:/swag-ssl`) and in the other containers, use the cert location `/swag-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:
|
||||
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)
|
||||
@@ -102,11 +103,12 @@ This will *ask* Google et al not to index and list your site. Be careful with th
|
||||
|
||||
### Using fail2ban
|
||||
|
||||
* This container includes fail2ban set up with 4 jails by default:
|
||||
* This container includes fail2ban set up with 5 jails by default:
|
||||
1. nginx-http-auth
|
||||
2. nginx-badbots
|
||||
3. nginx-botsearch
|
||||
4. nginx-deny
|
||||
5. nginx-unauthorized
|
||||
* To enable or disable other jails, modify the file `/config/fail2ban/jail.local`
|
||||
* To modify filters and actions, instead of editing the `.conf` files, create `.local` files with the same name and edit those because .conf files get overwritten when the actions and filters are updated. `.local` files will append whatever's in the `.conf` files (ie. `nginx-http-auth.conf` --> `nginx-http-auth.local`)
|
||||
* You can check which jails are active via `docker exec -it swag fail2ban-client status`
|
||||
@@ -142,7 +144,7 @@ Here are some example snippets to help you get started creating a container.
|
||||
version: "2.1"
|
||||
services:
|
||||
swag:
|
||||
image: lscr.io/linuxserver/swag
|
||||
image: lscr.io/linuxserver/swag:latest
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
@@ -161,7 +163,6 @@ services:
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS= #optional
|
||||
- STAGING=false #optional
|
||||
- MAXMINDDB_LICENSE_KEY= #optional
|
||||
volumes:
|
||||
- /path/to/appdata/config:/config
|
||||
ports:
|
||||
@@ -190,12 +191,11 @@ docker run -d \
|
||||
-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 \
|
||||
lscr.io/linuxserver/swag
|
||||
lscr.io/linuxserver/swag:latest
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -213,16 +213,19 @@ Container images are configured using parameters passed at runtime (such as thos
|
||||
| `-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 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 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`, `he`, `hetzner`, `inwx`, `ionos`, `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 DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `azure`, `cloudflare`, `cloudxns`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `domeneshop`, `dynu`, `gandi`, `gehirn`, `google`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `standalone`, `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. |
|
||||
|
||||
### Portainer notice
|
||||
|
||||
This image utilises `cap_add` or `sysctl` to work properly. This is not implemented properly in some versions of Portainer, thus this image may not work if deployed through Portainer.
|
||||
|
||||
## Environment variables from files (Docker secrets)
|
||||
|
||||
You can set any environment variable from a file by using a special prepend `FILE__`.
|
||||
@@ -266,7 +269,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
|
||||
* container version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' swag`
|
||||
* image version number
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/swag`
|
||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/swag:latest`
|
||||
|
||||
## Updating Info
|
||||
|
||||
@@ -284,7 +287,7 @@ Below are the instructions for updating containers:
|
||||
|
||||
### Via Docker Run
|
||||
|
||||
* Update the image: `docker pull lscr.io/linuxserver/swag`
|
||||
* Update the image: `docker pull lscr.io/linuxserver/swag:latest`
|
||||
* Stop the running container: `docker stop swag`
|
||||
* Delete the container: `docker rm swag`
|
||||
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
|
||||
@@ -332,6 +335,19 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **10.08.22:** - Added support for Dynu DNS validation.
|
||||
* **18.05.22:** - Added support for Azure DNS validation.
|
||||
* **09.04.22:** - Added certbot-dns-loopia for DNS01 validation.
|
||||
* **05.04.22:** - Added support for standalone DNS validation.
|
||||
* **28.03.22:** - created a logfile for fail2ban nginx-unauthorized in /etc/cont-init.d/50-config
|
||||
* **09.01.22:** - Added a fail2ban jail for nginx unauthorized
|
||||
* **21.12.21:** - Fixed issue with iptables not working as expected
|
||||
* **30.11.21:** - Move maxmind to a [new mod](https://github.com/linuxserver/docker-mods/tree/swag-maxmind)
|
||||
* **22.11.21:** - Added support for Infomaniak DNS for certificate generation.
|
||||
* **20.11.21:** - Added support for dnspod validation.
|
||||
* **15.11.21:** - Added support for deSEC DNS for wildcard certificate generation.
|
||||
* **26.10.21:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf - Mitigate https://httpoxy.org/ vulnerabilities. Ref: https://www.nginx.com/blog/mitigating-the-httpoxy-vulnerability-with-nginx#Defeating-the-Attack-using-NGINX-and-NGINX-Plus
|
||||
* **23.10.21:** - Fix Hurricane Electric (HE) DNS validation.
|
||||
* **12.10.21:** - Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking.
|
||||
* **06.10.21:** - Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps.
|
||||
* **01.10.21:** - Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
alpine-baselayout-3.2.0-r16
|
||||
alpine-keys-2.3-r1
|
||||
apache2-utils-2.4.50-r0
|
||||
alpine-keys-2.4-r0
|
||||
apache2-utils-2.4.54-r0
|
||||
apk-tools-2.12.7-r0
|
||||
apr-1.7.0-r0
|
||||
apr-1.7.0-r1
|
||||
apr-util-1.6.1-r7
|
||||
argon2-libs-20190702-r1
|
||||
bash-5.1.4-r0
|
||||
bash-5.1.16-r0
|
||||
brotli-libs-1.0.9-r5
|
||||
busybox-1.33.1-r3
|
||||
busybox-1.33.1-r8
|
||||
c-client-2007f-r11
|
||||
ca-certificates-20191127-r5
|
||||
ca-certificates-bundle-20191127-r5
|
||||
ca-certificates-20220614-r0
|
||||
ca-certificates-bundle-20220614-r0
|
||||
coreutils-8.32-r2
|
||||
curl-7.79.1-r0
|
||||
expat-2.4.1-r0
|
||||
curl-7.79.1-r2
|
||||
expat-2.4.7-r0
|
||||
fail2ban-0.11.2-r0
|
||||
freetype-2.10.4-r1
|
||||
freetype-2.10.4-r3
|
||||
gdbm-1.19-r0
|
||||
git-2.32.0-r0
|
||||
git-perl-2.32.0-r0
|
||||
git-2.32.3-r0
|
||||
git-perl-2.32.3-r0
|
||||
glib-2.68.3-r0
|
||||
gmp-6.2.1-r0
|
||||
gnupg-2.2.31-r0
|
||||
gnutls-3.7.1-r0
|
||||
gmp-6.2.1-r1
|
||||
gnupg-2.2.31-r1
|
||||
gnutls-3.7.1-r1
|
||||
icu-libs-67.1-r2
|
||||
ip6tables-1.8.7-r1
|
||||
iptables-1.8.7-r1
|
||||
libacl-2.2.53-r0
|
||||
libassuan-2.5.5-r0
|
||||
libattr-2.5.1-r0
|
||||
libblkid-2.37-r0
|
||||
libblkid-2.37.4-r0
|
||||
libbsd-0.11.3-r0
|
||||
libbz2-1.0.8-r1
|
||||
libc-utils-0.7.2-r3
|
||||
libcap-2.50-r0
|
||||
libcrypto1.1-1.1.1l-r0
|
||||
libcurl-7.79.1-r0
|
||||
libcrypto1.1-1.1.1q-r0
|
||||
libcurl-7.79.1-r2
|
||||
libedit-20210216.3.1-r0
|
||||
libevent-2.1.12-r2
|
||||
libffi-3.3-r2
|
||||
@@ -55,127 +55,127 @@ libmcrypt-2.5.8-r9
|
||||
libmd-1.0.3-r0
|
||||
libmemcached-libs-1.0.18-r4
|
||||
libmnl-1.0.4-r1
|
||||
libmount-2.37-r0
|
||||
libmount-2.37.4-r0
|
||||
libnftnl-libs-1.2.0-r0
|
||||
libpng-1.6.37-r1
|
||||
libpq-13.4-r0
|
||||
libpq-13.8-r0
|
||||
libproc-3.3.17-r0
|
||||
libressl3.3-libcrypto-3.3.3-r0
|
||||
libressl3.3-libssl-3.3.3-r0
|
||||
libretls-3.3.3p1-r2
|
||||
libsasl-2.1.27-r12
|
||||
libressl3.3-libcrypto-3.3.6-r0
|
||||
libressl3.3-libssl-3.3.6-r0
|
||||
libretls-3.3.3p1-r3
|
||||
libsasl-2.1.28-r0
|
||||
libseccomp-2.5.1-r2
|
||||
libsecret-0.20.4-r1
|
||||
libsm-1.2.3-r0
|
||||
libsodium-1.0.18-r0
|
||||
libssl1.1-1.1.1l-r0
|
||||
libssl1.1-1.1.1q-r0
|
||||
libstdc++-10.3.1_git20210424-r2
|
||||
libtasn1-4.17.0-r0
|
||||
libunistring-0.9.10-r1
|
||||
libuuid-2.37-r0
|
||||
libuuid-2.37.4-r0
|
||||
libwebp-1.2.0-r2
|
||||
libx11-1.7.2-r0
|
||||
libxau-1.0.9-r0
|
||||
libxcb-1.14-r2
|
||||
libxdmcp-1.1.3-r0
|
||||
libxext-1.3.4-r0
|
||||
libxml2-2.9.12-r1
|
||||
libxml2-2.9.14-r0
|
||||
libxpm-3.5.13-r0
|
||||
libxslt-1.1.34-r1
|
||||
libxslt-1.1.35-r0
|
||||
libxt-1.2.1-r0
|
||||
libzip-1.7.3-r2
|
||||
linux-pam-1.5.1-r1
|
||||
logrotate-3.18.1-r0
|
||||
lz4-libs-1.9.3-r0
|
||||
logrotate-3.18.1-r3
|
||||
lz4-libs-1.9.3-r1
|
||||
memcached-1.6.9-r0
|
||||
mpdecimal-2.5.1-r1
|
||||
musl-1.2.2-r3
|
||||
musl-utils-1.2.2-r3
|
||||
nano-5.7-r2
|
||||
ncurses-libs-6.2_p20210612-r0
|
||||
ncurses-terminfo-base-6.2_p20210612-r0
|
||||
ncurses-libs-6.2_p20210612-r1
|
||||
ncurses-terminfo-base-6.2_p20210612-r1
|
||||
nettle-3.7.3-r0
|
||||
nghttp2-libs-1.43.0-r0
|
||||
nginx-1.20.1-r3
|
||||
nginx-mod-devel-kit-1.20.1-r3
|
||||
nginx-mod-http-brotli-1.20.1-r3
|
||||
nginx-mod-http-dav-ext-1.20.1-r3
|
||||
nginx-mod-http-echo-1.20.1-r3
|
||||
nginx-mod-http-fancyindex-1.20.1-r3
|
||||
nginx-mod-http-geoip2-1.20.1-r3
|
||||
nginx-mod-http-headers-more-1.20.1-r3
|
||||
nginx-mod-http-image-filter-1.20.1-r3
|
||||
nginx-mod-http-nchan-1.20.1-r3
|
||||
nginx-mod-http-perl-1.20.1-r3
|
||||
nginx-mod-http-redis2-1.20.1-r3
|
||||
nginx-mod-http-set-misc-1.20.1-r3
|
||||
nginx-mod-http-upload-progress-1.20.1-r3
|
||||
nginx-mod-http-xslt-filter-1.20.1-r3
|
||||
nginx-mod-mail-1.20.1-r3
|
||||
nginx-mod-rtmp-1.20.1-r3
|
||||
nginx-mod-stream-1.20.1-r3
|
||||
nginx-mod-stream-geoip2-1.20.1-r3
|
||||
nginx-vim-1.20.1-r3
|
||||
nginx-1.20.2-r1
|
||||
nginx-mod-devel-kit-1.20.2-r1
|
||||
nginx-mod-http-brotli-1.20.2-r1
|
||||
nginx-mod-http-dav-ext-1.20.2-r1
|
||||
nginx-mod-http-echo-1.20.2-r1
|
||||
nginx-mod-http-fancyindex-1.20.2-r1
|
||||
nginx-mod-http-geoip2-1.20.2-r1
|
||||
nginx-mod-http-headers-more-1.20.2-r1
|
||||
nginx-mod-http-image-filter-1.20.2-r1
|
||||
nginx-mod-http-nchan-1.20.2-r1
|
||||
nginx-mod-http-perl-1.20.2-r1
|
||||
nginx-mod-http-redis2-1.20.2-r1
|
||||
nginx-mod-http-set-misc-1.20.2-r1
|
||||
nginx-mod-http-upload-progress-1.20.2-r1
|
||||
nginx-mod-http-xslt-filter-1.20.2-r1
|
||||
nginx-mod-mail-1.20.2-r1
|
||||
nginx-mod-rtmp-1.20.2-r1
|
||||
nginx-mod-stream-1.20.2-r1
|
||||
nginx-mod-stream-geoip2-1.20.2-r1
|
||||
nginx-vim-1.20.2-r1
|
||||
npth-1.6-r0
|
||||
oniguruma-6.9.7.1-r0
|
||||
openssl-1.1.1l-r0
|
||||
openssl-1.1.1q-r0
|
||||
p11-kit-0.23.22-r0
|
||||
pcre-8.44-r0
|
||||
pcre2-10.36-r0
|
||||
pcre2-10.36-r1
|
||||
perl-5.32.1-r0
|
||||
perl-error-0.17029-r1
|
||||
perl-git-2.32.0-r0
|
||||
php7-7.4.24-r0
|
||||
php7-bcmath-7.4.24-r0
|
||||
php7-bz2-7.4.24-r0
|
||||
php7-common-7.4.24-r0
|
||||
php7-ctype-7.4.24-r0
|
||||
php7-curl-7.4.24-r0
|
||||
php7-dom-7.4.24-r0
|
||||
php7-exif-7.4.24-r0
|
||||
php7-fileinfo-7.4.24-r0
|
||||
php7-fpm-7.4.24-r0
|
||||
php7-ftp-7.4.24-r0
|
||||
php7-gd-7.4.24-r0
|
||||
php7-gmp-7.4.24-r0
|
||||
php7-iconv-7.4.24-r0
|
||||
php7-imap-7.4.24-r0
|
||||
php7-intl-7.4.24-r0
|
||||
php7-json-7.4.24-r0
|
||||
php7-ldap-7.4.24-r0
|
||||
php7-mbstring-7.4.24-r0
|
||||
php7-mysqli-7.4.24-r0
|
||||
php7-mysqlnd-7.4.24-r0
|
||||
php7-opcache-7.4.24-r0
|
||||
php7-openssl-7.4.24-r0
|
||||
php7-pdo-7.4.24-r0
|
||||
php7-pdo_mysql-7.4.24-r0
|
||||
php7-pdo_odbc-7.4.24-r0
|
||||
php7-pdo_pgsql-7.4.24-r0
|
||||
php7-pdo_sqlite-7.4.24-r0
|
||||
php7-pear-7.4.24-r0
|
||||
php7-pecl-apcu-5.1.20-r0
|
||||
php7-pecl-igbinary-3.2.4-r0
|
||||
perl-git-2.32.3-r0
|
||||
php7-7.4.26-r0
|
||||
php7-bcmath-7.4.26-r0
|
||||
php7-bz2-7.4.26-r0
|
||||
php7-common-7.4.26-r0
|
||||
php7-ctype-7.4.26-r0
|
||||
php7-curl-7.4.26-r0
|
||||
php7-dom-7.4.26-r0
|
||||
php7-exif-7.4.26-r0
|
||||
php7-fileinfo-7.4.26-r0
|
||||
php7-fpm-7.4.26-r0
|
||||
php7-ftp-7.4.26-r0
|
||||
php7-gd-7.4.26-r0
|
||||
php7-gmp-7.4.26-r0
|
||||
php7-iconv-7.4.26-r0
|
||||
php7-imap-7.4.26-r0
|
||||
php7-intl-7.4.26-r0
|
||||
php7-json-7.4.26-r0
|
||||
php7-ldap-7.4.26-r0
|
||||
php7-mbstring-7.4.26-r0
|
||||
php7-mysqli-7.4.26-r0
|
||||
php7-mysqlnd-7.4.26-r0
|
||||
php7-opcache-7.4.26-r0
|
||||
php7-openssl-7.4.26-r0
|
||||
php7-pdo-7.4.26-r0
|
||||
php7-pdo_mysql-7.4.26-r0
|
||||
php7-pdo_odbc-7.4.26-r0
|
||||
php7-pdo_pgsql-7.4.26-r0
|
||||
php7-pdo_sqlite-7.4.26-r0
|
||||
php7-pear-7.4.26-r0
|
||||
php7-pecl-apcu-5.1.21-r0
|
||||
php7-pecl-igbinary-3.2.6-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.24-r0
|
||||
php7-phar-7.4.24-r0
|
||||
php7-posix-7.4.24-r0
|
||||
php7-session-7.4.24-r0
|
||||
php7-simplexml-7.4.24-r0
|
||||
php7-soap-7.4.24-r0
|
||||
php7-sockets-7.4.24-r0
|
||||
php7-sodium-7.4.24-r0
|
||||
php7-sqlite3-7.4.24-r0
|
||||
php7-tokenizer-7.4.24-r0
|
||||
php7-xml-7.4.24-r0
|
||||
php7-xmlreader-7.4.24-r0
|
||||
php7-xmlrpc-7.4.24-r0
|
||||
php7-xmlwriter-7.4.24-r0
|
||||
php7-xsl-7.4.24-r0
|
||||
php7-zip-7.4.24-r0
|
||||
php7-pgsql-7.4.26-r0
|
||||
php7-phar-7.4.26-r0
|
||||
php7-posix-7.4.26-r0
|
||||
php7-session-7.4.26-r0
|
||||
php7-simplexml-7.4.26-r0
|
||||
php7-soap-7.4.26-r0
|
||||
php7-sockets-7.4.26-r0
|
||||
php7-sodium-7.4.26-r0
|
||||
php7-sqlite3-7.4.26-r0
|
||||
php7-tokenizer-7.4.26-r0
|
||||
php7-xml-7.4.26-r0
|
||||
php7-xmlreader-7.4.26-r0
|
||||
php7-xmlrpc-7.4.26-r0
|
||||
php7-xmlwriter-7.4.26-r0
|
||||
php7-xsl-7.4.26-r0
|
||||
php7-zip-7.4.26-r0
|
||||
pinentry-1.1.1-r0
|
||||
popt-1.18-r0
|
||||
procps-3.3.17-r0
|
||||
@@ -209,19 +209,19 @@ py3-six-1.15.0-r1
|
||||
py3-toml-0.10.2-r2
|
||||
py3-urllib3-1.26.5-r0
|
||||
py3-webencodings-0.5.1-r4
|
||||
python3-3.9.5-r1
|
||||
python3-3.9.5-r2
|
||||
readline-8.1.0-r0
|
||||
s6-ipcserver-2.10.0.3-r0
|
||||
scanelf-1.3.2-r0
|
||||
shadow-4.8.1-r0
|
||||
skalibs-2.10.0.3-r0
|
||||
sqlite-libs-3.35.5-r0
|
||||
ssl_client-1.33.1-r3
|
||||
tzdata-2021c-r0
|
||||
ssl_client-1.33.1-r8
|
||||
tzdata-2022a-r0
|
||||
unixodbc-2.3.9-r1
|
||||
utmps-0.1.0.2-r0
|
||||
whois-5.5.10-r0
|
||||
xz-5.2.5-r0
|
||||
xz-libs-5.2.5-r0
|
||||
zlib-1.2.11-r3
|
||||
xz-5.2.5-r1
|
||||
xz-libs-5.2.5-r1
|
||||
zlib-1.2.12-r3
|
||||
zstd-libs-1.4.9-r1
|
||||
|
||||
@@ -51,14 +51,13 @@ opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "SUBDOMAINS", env_value: "www,", desc: "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)" }
|
||||
- { 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`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `he`, `hetzner`, `inwx`, `ionos`, `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: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `azure`, `cloudflare`, `cloudxns`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `domeneshop`, `dynu`, `gandi`, `gehirn`, `google`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `standalone`, `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)." }
|
||||
- { 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: "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: "MAXMINDDB_LICENSE_KEY", env_value: "", desc: "Add your MaxmindDB license key to automatically download the GeoLite2-City.mmdb database. Download location is /config/geoip2db. The database is updated weekly."}
|
||||
opt_param_usage_include_vols: false
|
||||
opt_param_volumes:
|
||||
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files." }
|
||||
@@ -112,8 +111,8 @@ app_setup_block: |
|
||||
|
||||
* This container includes auto-generated pfx and private-fullchain-bundle pem certs that are needed by other apps like Emby and Znc.
|
||||
* To use these certs in other containers, do either of the following:
|
||||
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)
|
||||
1. *(Easier)* Mount the container's config folder in other containers (ie. `-v /path-to-swag-config:/swag-ssl`) and in the other containers, use the cert location `/swag-ssl/keys/letsencrypt/`
|
||||
2. *(More secure)* Mount the SWAG folder `etc` that resides under `/config` in other containers (ie. `-v /path-to-swag-config/etc:/swag-ssl`) and in the other containers, use the cert location `/swag-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:
|
||||
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)
|
||||
@@ -121,11 +120,12 @@ app_setup_block: |
|
||||
|
||||
### Using fail2ban
|
||||
|
||||
* This container includes fail2ban set up with 4 jails by default:
|
||||
* This container includes fail2ban set up with 5 jails by default:
|
||||
1. nginx-http-auth
|
||||
2. nginx-badbots
|
||||
3. nginx-botsearch
|
||||
4. nginx-deny
|
||||
5. nginx-unauthorized
|
||||
* To enable or disable other jails, modify the file `/config/fail2ban/jail.local`
|
||||
* To modify filters and actions, instead of editing the `.conf` files, create `.local` files with the same name and edit those because .conf files get overwritten when the actions and filters are updated. `.local` files will append whatever's in the `.conf` files (ie. `nginx-http-auth.conf` --> `nginx-http-auth.local`)
|
||||
* You can check which jails are active via `docker exec -it swag fail2ban-client status`
|
||||
@@ -155,6 +155,19 @@ app_setup_nginx_reverse_proxy_block: ""
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "10.08.22:", desc: "Added support for Dynu DNS validation." }
|
||||
- { date: "18.05.22:", desc: "Added support for Azure DNS validation." }
|
||||
- { date: "09.04.22:", desc: "Added certbot-dns-loopia for DNS01 validation." }
|
||||
- { date: "05.04.22:", desc: "Added support for standalone DNS validation." }
|
||||
- { date: "28.03.22:", desc: "created a logfile for fail2ban nginx-unauthorized in /etc/cont-init.d/50-config" }
|
||||
- { date: "09.01.22:", desc: "Added a fail2ban jail for nginx unauthorized" }
|
||||
- { date: "21.12.21:", desc: "Fixed issue with iptables not working as expected" }
|
||||
- { date: "30.11.21:", desc: "Move maxmind to a [new mod](https://github.com/linuxserver/docker-mods/tree/swag-maxmind)" }
|
||||
- { date: "22.11.21:", desc: "Added support for Infomaniak DNS for certificate generation." }
|
||||
- { date: "20.11.21:", desc: "Added support for dnspod validation." }
|
||||
- { date: "15.11.21:", desc: "Added support for deSEC DNS for wildcard certificate generation." }
|
||||
- { date: "26.10.21:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf - Mitigate https://httpoxy.org/ vulnerabilities. Ref: https://www.nginx.com/blog/mitigating-the-httpoxy-vulnerability-with-nginx#Defeating-the-Attack-using-NGINX-and-NGINX-Plus" }
|
||||
- { date: "23.10.21:", desc: "Fix Hurricane Electric (HE) DNS validation." }
|
||||
- { date: "12.10.21:", desc: "Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking." }
|
||||
- { date: "06.10.21:", desc: "Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps." }
|
||||
- { date: "01.10.21:", desc: "Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration" }
|
||||
|
||||
@@ -32,12 +32,6 @@ server {
|
||||
# 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;
|
||||
#}
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
|
||||
26
root/defaults/dns-conf/azure.ini
Normal file
26
root/defaults/dns-conf/azure.ini
Normal file
@@ -0,0 +1,26 @@
|
||||
# Instructions: https://certbot-dns-azure.readthedocs.io/en/latest/
|
||||
# Replace with your values
|
||||
# dns_azure_environment can be one of the following: AzurePublicCloud, AzureUSGovernmentCloud, AzureChinaCloud, AzureGermanCloud
|
||||
# Service Principal with Client Secret
|
||||
dns_azure_sp_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
|
||||
dns_azure_sp_client_secret = E-xqXU83Y-jzTI6xe9fs2YC~mck3ZzUih9
|
||||
dns_azure_tenant_id = ed1090f3-ab18-4b12-816c-599af8a88cf7
|
||||
dns_azure_environment = "AzurePublicCloud"
|
||||
dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
|
||||
|
||||
|
||||
# Service Prinicipal with Certificate
|
||||
#dns_azure_sp_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
|
||||
#dns_azure_sp_certificate_path = /path/to/certificate.pem
|
||||
#dns_azure_tenant_id = ed1090f3-ab18-4b12-816c-599af8a88cf7
|
||||
#dns_azure_environment = "AzurePublicCloud"
|
||||
#dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
|
||||
|
||||
# Azure Managed Identity
|
||||
#dns_azure_msi_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5
|
||||
#dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
|
||||
|
||||
# System Assigned Azure Managed Identity
|
||||
#dns_azure_msi_system_assigned = true
|
||||
#dns_azure_environment = "AzurePublicCloud"
|
||||
#dns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1
|
||||
4
root/defaults/dns-conf/desec.ini
Normal file
4
root/defaults/dns-conf/desec.ini
Normal file
@@ -0,0 +1,4 @@
|
||||
# Instructions: https://pypi.org/project/certbot-dns-desec/
|
||||
# Replace with your Desec V1 API Token
|
||||
dns_desec_token=YOUR_TOKEN_HERE
|
||||
dns_desec_endpoint=https://desec.io/api/v1/
|
||||
5
root/defaults/dns-conf/dnspod.ini
Normal file
5
root/defaults/dns-conf/dnspod.ini
Normal file
@@ -0,0 +1,5 @@
|
||||
# Instructions: https://github.com/SkyLothar/certbot-dns-dnspod#create-a-credentials-file
|
||||
# Obtain your own DNSPod API token at DNSPod console: https://console.dnspod.cn/account/token/token
|
||||
# Replace with your own email, id and token
|
||||
dns_dnspod_email = "me@example.com"
|
||||
dns_dnspod_api_token = "12345,1234567890abcdef1234567890abcdef"
|
||||
3
root/defaults/dns-conf/dynu.ini
Normal file
3
root/defaults/dns-conf/dynu.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
# Instructions: https://github.com/bikram990/certbot-dns-dynu#configuration
|
||||
# Replace with your API token from your dynu account.
|
||||
dns_dynu_auth_token = AbCbASsd!@34
|
||||
3
root/defaults/dns-conf/infomaniak.ini
Normal file
3
root/defaults/dns-conf/infomaniak.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
Instructions: https://github.com/Infomaniak/certbot-dns-infomaniak#via-ini-file
|
||||
# Replace with your values
|
||||
dns_infomaniak_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
3
root/defaults/dns-conf/loopia.ini
Normal file
3
root/defaults/dns-conf/loopia.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
# Replace with your values
|
||||
dns_loopia_user = user@loopiaapi
|
||||
dns_loopia_password = passwordgoeshere
|
||||
8
root/defaults/dns-conf/standalone.ini
Normal file
8
root/defaults/dns-conf/standalone.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
# Instructions: https://github.com/siilike/certbot-dns-standalone/blob/master/README.rst
|
||||
# Make sure to expose UDP port 53 from your swag container:
|
||||
# - for docker cli, add argument: `-p 53:53/udp`
|
||||
# - for docker-compose, add the following line under ports: `- 53:53/udp`
|
||||
# This file does not need to be changed:
|
||||
# - no credentials are required
|
||||
# - it's not used and only for informational purpose
|
||||
# - prepare the correct DNS records as described in the plugin instructions instead
|
||||
7
root/defaults/fail2ban/filter.d/nginx-unauthorized.conf
Normal file
7
root/defaults/fail2ban/filter.d/nginx-unauthorized.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
# A fail2ban filter for unauthorized log messages
|
||||
|
||||
[Definition]
|
||||
|
||||
failregex = ^(?!.*?(?i)plex)<HOST>.*"(GET|POST|HEAD).*" 401 .*$
|
||||
|
||||
ignoreregex =
|
||||
@@ -1,123 +0,0 @@
|
||||
## Version 2020/10/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/geoip2.conf
|
||||
# To enable, uncommment the Geoip2 config line in nginx.conf
|
||||
# Add the -e MAXMINDDB_LICENSE_KEY=<licensekey> to automatically download the Geolite2 database.
|
||||
# A Maxmind license key can be acquired here: https://www.maxmind.com/en/geolite2/signup
|
||||
|
||||
geoip2 /config/geoip2db/GeoLite2-City.mmdb {
|
||||
auto_reload 1w;
|
||||
$geoip2_data_city_name city names en;
|
||||
$geoip2_data_postal_code postal code;
|
||||
$geoip2_data_latitude location latitude;
|
||||
$geoip2_data_longitude location longitude;
|
||||
$geoip2_data_state_name subdivisions 0 names en;
|
||||
$geoip2_data_state_code subdivisions 0 iso_code;
|
||||
$geoip2_data_continent_code continent code;
|
||||
$geoip2_data_country_iso_code country iso_code;
|
||||
}
|
||||
|
||||
# GEOIP2 COUNTRY CONFIG
|
||||
map $geoip2_data_country_iso_code $allowed_country {
|
||||
# default must be yes or no
|
||||
# If default is set to "no" you will need to add the local ip ranges that you want to allow access in the $allow_list variable below.
|
||||
default yes;
|
||||
|
||||
# Below you will setup conditions with yes or no
|
||||
# ex: <condition> <yes/no>;
|
||||
|
||||
# allow United Kingdom.
|
||||
#GB yes;
|
||||
}
|
||||
|
||||
# GEOIP2 CITY CONFIG
|
||||
map $geoip2_data_city_name $allowed_city {
|
||||
# default must be yes or no
|
||||
# If default is set to "no" you will need to add the local ip ranges that you want to allow access in the $allow_list variable below.
|
||||
default yes;
|
||||
|
||||
# Below you will setup conditions with yes or no
|
||||
# ex: <condition> <yes/no>;
|
||||
|
||||
# allow Inverness.
|
||||
#Inverness yes;
|
||||
}
|
||||
|
||||
# ALLOW LOCAL ACCESS
|
||||
geo $allow_list {
|
||||
default yes; # Set this to no if $allowed_country or $allowed_city default is no.
|
||||
# IP/CIDR yes; # e.g. 192.168.1.0/24 yes;
|
||||
}
|
||||
|
||||
# Server config example:
|
||||
# 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;
|
||||
# }
|
||||
#########################################
|
||||
|
||||
# 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;
|
||||
# }
|
||||
#########################################
|
||||
|
||||
# Example using a config from proxy-confs
|
||||
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl;
|
||||
#
|
||||
# server_name unifi.*;
|
||||
#
|
||||
# include /config/nginx/ssl.conf;
|
||||
#
|
||||
# client_max_body_size 0;
|
||||
#
|
||||
# # enable for ldap auth, fill in ldap details in ldap.conf
|
||||
# #include /config/nginx/ldap.conf;
|
||||
#
|
||||
# # enable for Authelia
|
||||
# #include /config/nginx/authelia-server.conf;
|
||||
|
||||
|
||||
# # Allow lan access if default is set to no
|
||||
# if ($allow_list = yes) {
|
||||
# set $allowed_country yes;
|
||||
# }
|
||||
# # Country geo block
|
||||
# if ($allowed_country = no) {
|
||||
# return 444;
|
||||
# }
|
||||
|
||||
|
||||
#
|
||||
# location / {
|
||||
# # enable the next two lines for http auth
|
||||
# #auth_basic "Restricted";
|
||||
# #auth_basic_user_file /config/nginx/.htpasswd;
|
||||
#
|
||||
# # 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;
|
||||
#
|
||||
# include /config/nginx/proxy.conf;
|
||||
# resolver 127.0.0.11 valid=30s;
|
||||
# set $upstream_app unifi-controller;
|
||||
# set $upstream_port 8443;
|
||||
# set $upstream_proto https;
|
||||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
#
|
||||
# proxy_buffering off;
|
||||
# }
|
||||
#}
|
||||
@@ -1,10 +1,14 @@
|
||||
## Version 2020/05/10 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/jail.local
|
||||
## Version 2022/01/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/jail.local
|
||||
# This is the custom version of the jail.conf for fail2ban
|
||||
# Feel free to modify this and add additional filters
|
||||
# Then you can drop the new filter conf files into the fail2ban-filters
|
||||
# folder and restart the container
|
||||
|
||||
[DEFAULT]
|
||||
# Prevents banning LAN subnets
|
||||
ignoreip = 10.0.0.0/8
|
||||
192.168.0.0/16
|
||||
172.16.0.0/12
|
||||
|
||||
# Changes the default ban action from "iptables-multiport", which causes issues on some platforms, to "iptables-allports".
|
||||
banaction = iptables-allports
|
||||
@@ -21,37 +25,35 @@ maxretry = 5
|
||||
|
||||
|
||||
[ssh]
|
||||
|
||||
enabled = false
|
||||
|
||||
|
||||
[nginx-http-auth]
|
||||
|
||||
enabled = true
|
||||
filter = nginx-http-auth
|
||||
port = http,https
|
||||
logpath = /config/log/nginx/error.log
|
||||
|
||||
|
||||
[nginx-badbots]
|
||||
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-badbots
|
||||
logpath = /config/log/nginx/access.log
|
||||
maxretry = 2
|
||||
|
||||
|
||||
[nginx-botsearch]
|
||||
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-botsearch
|
||||
logpath = /config/log/nginx/access.log
|
||||
|
||||
[nginx-deny]
|
||||
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-deny
|
||||
logpath = /config/log/nginx/error.log
|
||||
|
||||
[nginx-unauthorized]
|
||||
enabled = true
|
||||
port = http,https
|
||||
filter = nginx-unauthorized
|
||||
logpath = /config/log/nginx/unauthorized.log
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
|
||||
## Version 2022/01/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
|
||||
|
||||
user abc;
|
||||
|
||||
@@ -55,6 +55,13 @@ http {
|
||||
'' close;
|
||||
}
|
||||
|
||||
# Saves unauthorized log messages to a separate log file
|
||||
map $status $unauthorized {
|
||||
default 0;
|
||||
~^401 1;
|
||||
}
|
||||
access_log /config/log/nginx/unauthorized.log combined if=$unauthorized;
|
||||
|
||||
# Sets the path, format, and configuration for a buffered log write.
|
||||
access_log /config/log/nginx/access.log;
|
||||
|
||||
@@ -115,14 +122,6 @@ http {
|
||||
##
|
||||
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 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2021/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/proxy.conf
|
||||
## Version 2021/10/26 - 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;
|
||||
@@ -22,6 +22,7 @@ proxy_no_cache $cookie_session;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Early-Data $ssl_early_data;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Proxy "";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
|
||||
@@ -76,8 +76,6 @@ cp /config/fail2ban/jail.local /etc/fail2ban/jail.local
|
||||
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
|
||||
[[ ! -f /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
|
||||
|
||||
@@ -122,7 +120,7 @@ if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then
|
||||
fi
|
||||
|
||||
# check to make sure DNSPLUGIN is selected if dns validation is used
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|directadmin|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|ionos|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip|vultr)$ ]] && \
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|azure|cloudflare|cloudxns|cpanel|desec|digitalocean|directadmin|dnsimple|dnsmadeeasy|dnspod|domeneshop|dynu|gandi|gehirn|google|he|hetzner|infomaniak|inwx|ionos|linode|loopia|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|standalone|transip|vultr)$ ]] && \
|
||||
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
|
||||
sleep infinity
|
||||
|
||||
@@ -236,12 +234,18 @@ if [ "$VALIDATION" = "dns" ]; then
|
||||
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|he|hetzner|inwx|ionos|netcup|njalla|transip|vultr)$ ]]; then
|
||||
elif [[ "$DNSPLUGIN" =~ ^(aliyun|desec|dnspod|domeneshop|dynu|he|hetzner|infomaniak|inwx|ionos|loopia|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" =~ ^(standalone)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then echo "standalone dns plugin does not support setting propagation time"; fi
|
||||
PREFCHAL="-a dns-${DNSPLUGIN}"
|
||||
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}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(azure)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then echo "Azure dns plugin does not support setting propagation time"; fi
|
||||
PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini"
|
||||
else
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
@@ -362,24 +366,14 @@ fi
|
||||
rm -rf /var/lib/libmaxminddb
|
||||
[[ ! -d /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/libmaxminddb.cron.conf
|
||||
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."
|
||||
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."
|
||||
fi
|
||||
|
||||
# logfiles needed by fail2ban
|
||||
[[ ! -f /config/log/nginx/error.log ]] && \
|
||||
touch /config/log/nginx/error.log
|
||||
[[ ! -f /config/log/nginx/access.log ]] && \
|
||||
touch /config/log/nginx/access.log
|
||||
[[ ! -f /config/log/nginx/unauthorized.log ]] && \
|
||||
touch /config/log/nginx/unauthorized.log
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
nginx_confs=( \
|
||||
authelia-location.conf \
|
||||
authelia-server.conf \
|
||||
geoip2.conf \
|
||||
ldap.conf \
|
||||
nginx.conf \
|
||||
proxy.conf \
|
||||
|
||||
Reference in New Issue
Block a user