Compare commits

..

301 Commits

Author SHA1 Message Date
LinuxServer-CI
e1340c6c9e Bot Updating Package Versions 2024-08-24 03:27:44 +00:00
LinuxServer-CI
96998a1002 Bot Updating Templated Files 2024-08-24 03:22:15 +00:00
LinuxServer-CI
4fb557dcda Bot Updating Templated Files 2024-08-24 03:20:37 +00:00
LinuxServer-CI
ea13c5a885 Bot Updating Package Versions 2024-08-17 03:20:39 +00:00
LinuxServer-CI
ee0f1247d9 Bot Updating Package Versions 2024-08-15 04:22:26 +00:00
LinuxServer-CI
a8cf2c5c40 Bot Updating Package Versions 2024-08-10 03:27:12 +00:00
driz
62faebf642 Merge pull request #497 from linuxserver/readme-typo
fix typo
2024-08-07 08:30:01 -04:00
LinuxServer-CI
81e65837ca Bot Updating Package Versions 2024-08-07 12:08:32 +00:00
driz
a08edc14d2 fix typo 2024-08-07 08:06:25 -04:00
LinuxServer-CI
edf1abd83a Bot Updating Templated Files 2024-08-07 12:04:22 +00:00
driz
0357efea87 Merge pull request #491 from marblepebble/master
Fallback to iptables-legacy if iptables doesn't work
2024-08-07 08:01:42 -04:00
LinuxServer-CI
aa103ce997 Bot Updating Package Versions 2024-08-03 03:20:38 +00:00
marblepebble
20bbf040e0 Merge branch 'master' into master 2024-07-30 21:39:57 +01:00
Ainsley Pereira
e4a6e31b6f Add iptables-legacy to Dockerfile.aarch64 too 2024-07-30 21:24:12 +01:00
LinuxServer-CI
5b096a8a66 Bot Updating Package Versions 2024-07-27 03:22:59 +00:00
LinuxServer-CI
eb6dba6cbe Bot Updating Package Versions 2024-07-19 22:27:05 +00:00
LinuxServer-CI
afd6c9d827 Bot Updating Package Versions 2024-07-19 21:42:49 +00:00
Eric Nemchik
daa84f28b4 Merge pull request #492 from linuxserver/3.20
Rebase to 3.20
2024-07-19 16:36:39 -05:00
Eric Nemchik
cd931076e4 remove google-domains certbot plugin
Signed-off-by: GitHub <noreply@github.com>
2024-07-17 17:18:24 +00:00
Eric Nemchik
f5ce44887f keep ipv6 listen separate
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-07-16 19:48:55 -05:00
Eric Nemchik
875a17dfc7 Rebase to 3.20
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-07-14 09:57:01 -05:00
LinuxServer-CI
210134745d Bot Updating Package Versions 2024-07-13 03:24:57 +00:00
LinuxServer-CI
9d469c2957 Bot Updating Templated Files 2024-07-13 03:20:42 +00:00
LinuxServer-CI
37e64ebdac Bot Updating Templated Files 2024-07-13 03:19:19 +00:00
LinuxServer-CI
47fc525094 Bot Updating Package Versions 2024-07-06 03:24:36 +00:00
Ainsley Pereira
625b11d21c Add iptables-legacy and fall back to it if the normal iptables command doesn't work. Fixes #476 2024-07-01 17:28:48 +01:00
LinuxServer-CI
77accb3762 Bot Updating Package Versions 2024-06-29 03:24:09 +00:00
LinuxServer-CI
7dcce8b346 Bot Updating Package Versions 2024-06-22 03:22:28 +00:00
LinuxServer-CI
03286fc238 Bot Updating Package Versions 2024-06-15 03:20:18 +00:00
LinuxServer-CI
7391dc1bcf Bot Updating Package Versions 2024-06-08 03:20:15 +00:00
LinuxServer-CI
a7ea6a955b Bot Updating Package Versions 2024-06-06 03:23:13 +00:00
LinuxServer-CI
e149638808 Bot Updating Package Versions 2024-06-01 03:22:21 +00:00
LinuxServer-CI
41cb7cb104 Bot Updating Package Versions 2024-05-25 03:27:08 +00:00
LinuxServer-CI
1499cbe7de Bot Updating Templated Files 2024-05-25 03:23:50 +00:00
LinuxServer-CI
5a7d49ec43 Bot Updating Templated Files 2024-05-25 03:21:31 +00:00
LinuxServer-CI
efc2f55f48 Bot Updating Package Versions 2024-05-18 03:20:19 +00:00
LinuxServer-CI
95c13d0082 Bot Updating Package Versions 2024-05-11 03:22:43 +00:00
LinuxServer-CI
e05fc4b1e3 Bot Updating Templated Files 2024-05-11 03:18:51 +00:00
LinuxServer-CI
099e0e75a4 Bot Updating Package Versions 2024-05-04 03:23:10 +00:00
LinuxServer-CI
fc1675f3a1 Bot Updating Templated Files 2024-05-04 03:19:21 +00:00
LinuxServer-CI
dc1bc6d5b3 Bot Updating Package Versions 2024-04-27 03:19:53 +00:00
LinuxServer-CI
db6f61bd27 Bot Updating Package Versions 2024-04-20 03:19:29 +00:00
LinuxServer-CI
67f864c7b9 Bot Updating Package Versions 2024-04-18 22:03:11 +00:00
aptalca
3f885d0415 Merge pull request #472 from linuxserver/find
fix find for gnu
2024-04-18 17:59:23 -04:00
aptalca
280c4bde4b fix find for gnu 2024-04-18 15:53:44 -04:00
LinuxServer-CI
59e7865464 Bot Updating Package Versions 2024-04-13 03:15:36 +00:00
LinuxServer-CI
5c58fa9383 Bot Updating Package Versions 2024-04-06 03:20:55 +00:00
LinuxServer-CI
ae19b93cc7 Bot Updating Package Versions 2024-04-04 01:06:33 +00:00
LinuxServer-CI
5dee340726 Bot Updating Package Versions 2024-03-30 03:21:19 +00:00
aptalca
3109ff8d9c Merge pull request #468 from linuxserver/keyperm
fix perms on generated priv-fullchain-bundle.pem
2024-03-23 11:42:50 -04:00
aptalca
4239dc22d4 fix perms on generated priv-fullchain-bundle.pem 2024-03-23 11:10:04 -04:00
LinuxServer-CI
44c6bd721b Bot Updating Package Versions 2024-03-23 12:36:24 +00:00
LinuxServer-CI
d4a6be8fad Bot Updating Templated Files 2024-03-23 12:32:28 +00:00
Adam
a66b478d1d Merge pull request #463 from linuxserver/restore-dynudns
Restore dynudns plugin
2024-03-23 12:29:52 +00:00
LinuxServer-CI
9efac76e25 Bot Updating Package Versions 2024-03-23 03:19:27 +00:00
TheSpad
23c6384f2c Merge branch 'master' into restore-dynudns 2024-03-19 22:49:45 +00:00
aptalca
13ede8ea87 Merge pull request #467 from linuxserver/authelia-auth-endpoints
another authelia auth endpoint adjustment
2024-03-17 16:24:55 -04:00
Eric Nemchik
a9391d07ee another authelia auth endpoint adjustment
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-03-16 12:34:59 -05:00
LinuxServer-CI
a00d272297 Bot Updating Package Versions 2024-03-16 03:18:58 +00:00
LinuxServer-CI
0207bd8f30 Bot Updating Templated Files 2024-03-15 18:26:27 +00:00
Eric Nemchik
3fd209d686 Merge pull request #466 from linuxserver/nemchik-patch-1
Update readme-vars.yml
2024-03-15 13:23:06 -05:00
Eric Nemchik
87ced3fd3e Update readme-vars.yml 2024-03-15 13:08:37 -05:00
Eric Nemchik
3e342b0529 Update readme-vars.yml 2024-03-15 13:07:59 -05:00
LinuxServer-CI
c9504bb55f Bot Updating Package Versions 2024-03-15 15:55:24 +00:00
LinuxServer-CI
2573149089 Bot Updating Templated Files 2024-03-15 15:50:23 +00:00
Eric Nemchik
9b3f418afd Merge pull request #465 from linuxserver/authelia-4.38-alt
support for authelia 4.38+
2024-03-15 10:48:40 -05:00
Eric Nemchik
c63b437e1f Update comments
Signed-off-by: GitHub <noreply@github.com>
2024-03-15 14:41:19 +00:00
Eric Nemchik
f14c6a7a3a support for authelia 4.38+
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-03-14 21:57:51 -05:00
TheSpad
4b4c103df4 Restore dynudns plugin 2024-03-11 11:12:28 +00:00
LinuxServer-CI
26203c8c40 Bot Updating Package Versions 2024-03-09 03:21:46 +00:00
LinuxServer-CI
259850fcc5 Bot Updating Templated Files 2024-03-06 17:43:29 +00:00
Eric Nemchik
c6474f07ea Cleanup default site conf (#442)
* Cleanup default site conf

Signed-off-by: Eric Nemchik <eric@nemchik.com>

* update date

---------

Signed-off-by: Eric Nemchik <eric@nemchik.com>
Co-authored-by: aptalca <541623+aptalca@users.noreply.github.com>
2024-03-06 12:41:52 -05:00
LinuxServer-CI
b6a196b93a Bot Updating Package Versions 2024-03-06 16:22:38 +00:00
aptalca
3967276f06 Merge pull request #459 from linuxserver/stream
remove stream.conf
2024-03-06 11:18:47 -05:00
aptalca
4853736c4e add comment 2024-03-06 09:44:39 -05:00
aptalca
a8d03c5280 Merge pull request #460 from linuxserver/package-install
Run package installer as part of SWAG init to prevent init fail due to missing dns plugin
2024-03-05 08:31:23 -05:00
aptalca
907dfc8c03 Revert "Update root/etc/s6-overlay/s6-rc.d/init-certbot-config/run"
This reverts commit bf21a51e10.
2024-03-04 20:19:53 -05:00
aptalca
bf21a51e10 Update root/etc/s6-overlay/s6-rc.d/init-certbot-config/run
Co-authored-by: Eric Nemchik <eric@nemchik.com>
2024-03-04 19:33:01 -05:00
aptalca
32f72ac0b4 make it pretty, grep certbot-dns 2024-03-04 18:33:13 -05:00
aptalca
970fa75e87 run scripts direct 2024-03-04 18:23:04 -05:00
aptalca
137ad9f52e Run package installer as part of SWAG init to prevent init fail due to missing dns plugin 2024-03-04 18:10:49 -05:00
aptalca
5d0ec79ac5 remove stream.conf 2024-03-04 17:56:25 -05:00
LinuxServer-CI
3145477f72 Bot Updating Package Versions 2024-03-04 22:52:37 +00:00
aptalca
58b9470c52 Merge pull request #458 from linuxserver/edgerepo
package moved to community repo
2024-03-04 17:47:44 -05:00
aptalca
68f5cf8d9e package moved to community repo 2024-03-04 17:11:41 -05:00
LinuxServer-CI
e8d452f4ce Bot Updating Package Versions 2024-02-24 03:25:25 +00:00
LinuxServer-CI
4abd6c9890 Bot Updating Templated Files 2024-02-24 03:21:49 +00:00
LinuxServer-CI
c335faabdc Bot Updating Templated Files 2024-02-24 03:18:57 +00:00
LinuxServer-CI
204dd90f9d Bot Updating Package Versions 2024-02-17 03:20:23 +00:00
LinuxServer-CI
92bfbc19cd Bot Updating Package Versions 2024-02-10 03:18:04 +00:00
LinuxServer-CI
cb3c74a6ee Bot Updating Package Versions 2024-02-08 21:18:13 +00:00
LinuxServer-CI
b7f40863fe Bot Updating Package Versions 2024-02-03 03:21:47 +00:00
LinuxServer-CI
ec6fca9418 Bot Updating Package Versions 2024-01-27 18:57:53 +00:00
Eric Nemchik
25a2832056 Merge pull request #441 from linuxserver/3.19
Rebase to Alpine 3.19 with php 8.3, add root periodic crontabs for logrotate
2024-01-27 12:52:12 -06:00
LinuxServer-CI
3eabd75388 Bot Updating Package Versions 2024-01-27 03:17:21 +00:00
Eric Nemchik
6ed17c1d52 Merge branch 'master' into 3.19 2024-01-23 20:27:06 -06:00
LinuxServer-CI
e568785908 Bot Updating Package Versions 2024-01-20 03:20:49 +00:00
LinuxServer-CI
bcee5182e6 Bot Updating Package Versions 2024-01-13 03:22:08 +00:00
LinuxServer-CI
514cf42606 Bot Updating Templated Files 2024-01-13 03:17:41 +00:00
LinuxServer-CI
270a0d57c9 Bot Updating Package Versions 2024-01-09 20:00:59 +00:00
LinuxServer-CI
6f51d8be26 Bot Updating Templated Files 2024-01-09 19:54:13 +00:00
LinuxServer-CI
d915d516cd Bot Updating Templated Files 2024-01-09 19:47:00 +00:00
Eric Nemchik
ffb03a03f5 Merge pull request #425 from Peglah/dns_glesys
Add GleSYS DNS plugin
2024-01-09 13:43:24 -06:00
Eric Nemchik
9693b5884f Merge branch 'master' into dns_glesys 2024-01-09 13:28:15 -06:00
LinuxServer-CI
87ca95c8c2 Bot Updating Package Versions 2024-01-06 03:21:45 +00:00
Peglah
1a376a6975 rebased 2024-01-01 09:49:44 +01:00
Peglah
8e74593f2c Rebase, Add GleSYS DNS plugin 2024-01-01 09:40:00 +01:00
LinuxServer-CI
00d1bce24d Bot Updating Package Versions 2024-01-01 09:39:14 +01:00
LinuxServer-CI
be853fcb4b Bot Updating Package Versions 2024-01-01 09:39:14 +01:00
LinuxServer-CI
2fb6c1f51f Bot Updating Package Versions 2024-01-01 09:39:14 +01:00
LinuxServer-CI
9339d287d2 Bot Updating Package Versions 2024-01-01 09:39:14 +01:00
LinuxServer-CI
6b62a27bf0 Bot Updating Templated Files 2024-01-01 09:39:14 +01:00
Eric Nemchik
c50ca83ef9 Deprecate certbot-dns-dynu
Signed-off-by: GitHub <noreply@github.com>
2024-01-01 09:39:10 +01:00
LinuxServer-CI
bd94a67024 Bot Updating Package Versions 2024-01-01 09:38:33 +01:00
LinuxServer-CI
11e060174b Bot Updating Package Versions 2024-01-01 09:38:33 +01:00
driz
5f8a531a93 Update nginx-deny.conf 2024-01-01 09:38:33 +01:00
LinuxServer-CI
d2f843c4d1 Bot Updating Package Versions 2024-01-01 09:38:33 +01:00
LinuxServer-CI
ad6bb30bfc Bot Updating Package Versions 2024-01-01 09:38:33 +01:00
LinuxServer-CI
11991aa0b3 Bot Updating Package Versions 2024-01-01 09:38:33 +01:00
LinuxServer-CI
c76e664965 Bot Updating Templated Files 2024-01-01 09:38:33 +01:00
Eric Nemchik
ccbd19fe62 Update readme-vars.yml 2024-01-01 09:38:29 +01:00
LinuxServer-CI
2573b79bad Bot Updating Package Versions 2024-01-01 09:37:47 +01:00
LinuxServer-CI
0e5ba91588 Bot Updating Templated Files 2024-01-01 09:37:47 +01:00
Eric Nemchik
4f92460b29 Run certbot as root to allow fix http validation
Fixes regression from https://github.com/linuxserver/docker-swag/pull/399

Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:37:39 +01:00
Eric Nemchik
ad1884e5b4 Fix index.php being downloaded on 404
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:36:59 +01:00
LinuxServer-CI
70bea0a816 Bot Updating Package Versions 2024-01-01 09:23:16 +01:00
Eric Nemchik
85e44eb399 fix chown for group
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
4d3f30b67c Move crontabs to etc
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
9da97969f8 Crontabs folder created in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
2cd84ad12b cron in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
757ef31216 set owner of certbot folders to abc
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
767aad2286 Fix perms
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
Eric Nemchik
4cb18bc106 standard cron
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2024-01-01 09:23:16 +01:00
LinuxServer-CI
b1cf98d214 Bot Updating Package Versions 2024-01-01 09:23:16 +01:00
LinuxServer-CI
48dfde26c7 Bot Updating Templated Files 2024-01-01 09:23:16 +01:00
LinuxServer-CI
320404d358 Bot Updating Package Versions 2024-01-01 09:23:16 +01:00
aptalca
52ae487bea install mcrypt from community repo on alpine edge 2024-01-01 09:23:16 +01:00
LinuxServer-CI
65f62d14a6 Bot Updating Package Versions 2024-01-01 09:23:16 +01:00
LinuxServer-CI
accd20cc7a Bot Updating Package Versions 2023-12-30 03:18:23 +00:00
Eric Nemchik
24b3540da5 Fix php83-pecl-mcrypt
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-12-23 16:18:56 -06:00
Eric Nemchik
bc31b51afb Rebase to Alpine 3.19 with php 8.3, add root periodic crontabs for logrotate
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-12-23 16:12:03 -06:00
LinuxServer-CI
bf6ab14281 Bot Updating Package Versions 2023-12-23 03:17:49 +00:00
LinuxServer-CI
7c5d1d886c Bot Updating Package Versions 2023-12-16 03:18:17 +00:00
LinuxServer-CI
5b77a54620 Bot Updating Package Versions 2023-12-12 13:36:29 +00:00
LinuxServer-CI
3b1478667b Bot Updating Templated Files 2023-12-12 13:33:00 +00:00
Eric Nemchik
0ddf8a270b Merge pull request #439 from linuxserver/deprecate-dynu-plugin
Deprecate certbot-dns-dynu
2023-12-12 07:31:30 -06:00
Eric Nemchik
dabbaa3b14 Deprecate certbot-dns-dynu
Signed-off-by: GitHub <noreply@github.com>
2023-12-11 22:17:57 +00:00
LinuxServer-CI
bdd5e047ee Bot Updating Package Versions 2023-12-09 03:20:23 +00:00
LinuxServer-CI
78689b02e2 Bot Updating Package Versions 2023-12-07 13:54:35 +00:00
driz
6c1c4cd00a Update nginx-deny.conf 2023-12-07 08:50:27 -05:00
LinuxServer-CI
31cef5050f Bot Updating Package Versions 2023-12-06 01:09:14 +00:00
LinuxServer-CI
52e8f7223e Bot Updating Package Versions 2023-12-02 03:18:16 +00:00
LinuxServer-CI
1abab5cb6d Bot Updating Package Versions 2023-11-30 23:41:43 +00:00
LinuxServer-CI
0061faef15 Bot Updating Templated Files 2023-11-30 23:38:22 +00:00
Eric Nemchik
6e64bcbd7e Merge pull request #432 from linuxserver/php-404
Fix index.php being downloaded on 404
2023-11-30 17:36:52 -06:00
Eric Nemchik
b9dd1b7c5a Update readme-vars.yml 2023-11-30 17:33:07 -06:00
Eric Nemchik
e9bceab763 Merge branch 'master' into php-404 2023-11-30 17:29:03 -06:00
LinuxServer-CI
eba3c341fa Bot Updating Package Versions 2023-11-28 19:55:58 +00:00
LinuxServer-CI
5fc5825afd Bot Updating Templated Files 2023-11-28 19:50:37 +00:00
Eric Nemchik
de18e4ef24 Merge pull request #431 from linuxserver/root-certbot
Run certbot as root to allow fix http validation
2023-11-28 13:49:03 -06:00
Eric Nemchik
fbe212b67c Fix index.php being downloaded on 404
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-11-27 18:27:05 -06:00
LinuxServer-CI
2ca6807b64 Bot Updating Package Versions 2023-11-25 03:18:43 +00:00
Eric Nemchik
e3560414dc Run certbot as root to allow fix http validation
Fixes regression from https://github.com/linuxserver/docker-swag/pull/399

Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-11-23 07:50:53 -06:00
Eric Nemchik
2f4162578f Merge pull request #399 from linuxserver/standard-cron
standard cron
2023-11-18 19:11:17 -06:00
LinuxServer-CI
2697b74a8c Bot Updating Package Versions 2023-11-18 03:21:34 +00:00
LinuxServer-CI
bd685533a2 Bot Updating Templated Files 2023-11-18 03:17:25 +00:00
LinuxServer-CI
287b952aea Bot Updating Package Versions 2023-11-13 22:20:05 +00:00
aptalca
576b81ab91 Merge pull request #428 from linuxserver/mcrypt
install mcrypt from community repo on alpine edge
2023-11-13 17:16:22 -05:00
aptalca
8b0df1fcbb install mcrypt from community repo on alpine edge 2023-11-13 16:58:13 -05:00
LinuxServer-CI
efdfa45f37 Bot Updating Package Versions 2023-11-11 03:21:56 +00:00
Peglah
278b57fb47 Add GleSYS DNS plugin 2023-11-08 12:42:43 +01:00
Eric Nemchik
82e85d22c1 Merge branch 'master' into standard-cron 2023-11-04 18:37:38 -05:00
Eric Nemchik
8b49f2b0d4 fix chown for group
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-11-04 18:36:31 -05:00
LinuxServer-CI
10d0877547 Bot Updating Package Versions 2023-11-04 03:17:44 +00:00
Eric Nemchik
8fdb472564 Merge branch 'master' into standard-cron 2023-11-01 17:48:15 -05:00
LinuxServer-CI
f6d0e3089a Bot Updating Package Versions 2023-11-01 15:18:10 +00:00
LinuxServer-CI
5ceac2e2ec Bot Updating Package Versions 2023-10-28 03:17:26 +00:00
LinuxServer-CI
5b6498b1a9 Bot Updating Package Versions 2023-10-25 16:20:53 +00:00
LinuxServer-CI
118a76530e Bot Updating Package Versions 2023-10-24 00:07:06 +00:00
LinuxServer-CI
0499547b96 Bot Updating Package Versions 2023-10-21 03:17:27 +00:00
LinuxServer-CI
9cf01a0085 Bot Updating Package Versions 2023-10-20 01:05:07 +00:00
LinuxServer-CI
2b5a2785d6 Bot Updating Package Versions 2023-10-14 03:18:59 +00:00
LinuxServer-CI
202db184b3 Bot Updating Package Versions 2023-10-10 16:23:56 +00:00
LinuxServer-CI
3ed39caf43 Bot Updating Package Versions 2023-10-07 03:22:54 +00:00
LinuxServer-CI
9353e4e8a5 Bot Updating Templated Files 2023-10-07 03:19:04 +00:00
LinuxServer-CI
39e3159f39 Bot Updating Templated Files 2023-10-07 03:16:45 +00:00
Roxedus
9ba44dccee Merge pull request #415 from linuxserver/2.7-fix 2023-10-04 01:33:49 +02:00
Roxedus
49f6fb2b6e Update detection 2023-10-04 00:33:00 +02:00
LinuxServer-CI
693c24173b Bot Updating Package Versions 2023-10-03 20:17:30 +00:00
LinuxServer-CI
8a90cf85d8 Bot Updating Package Versions 2023-10-01 16:32:35 +00:00
LinuxServer-CI
fd958fe6b3 Bot Updating Templated Files 2023-10-01 16:29:08 +00:00
Eric Nemchik
eb8f12b5de Merge pull request #412 from Platzii/directadmin-fix
Fix "unrecognized arguments" issue in DirectAdmin DNS plugin
2023-10-01 11:27:34 -05:00
Simon Lepla
dae223ca0f Fix "unrecognized arguments" issue in DirectAdmin DNS plugin 2023-10-01 12:07:41 +02:00
LinuxServer-CI
14226ce700 Bot Updating Package Versions 2023-09-30 03:22:11 +00:00
LinuxServer-CI
b64bb62303 Bot Updating Package Versions 2023-09-23 03:18:35 +00:00
LinuxServer-CI
f478a200e8 Bot Updating Package Versions 2023-09-19 19:17:39 +00:00
LinuxServer-CI
40200982d1 Bot Updating Package Versions 2023-09-19 19:12:05 +00:00
Adam
3476f8b6f6 Merge pull request #406 from linuxserver/namecheap 2023-09-19 20:08:26 +01:00
LinuxServer-CI
3e9dc80ed4 Bot Updating Package Versions 2023-09-16 03:17:06 +00:00
LinuxServer-CI
4486d528d1 Bot Updating Package Versions 2023-09-09 03:19:54 +00:00
LinuxServer-CI
e0032ecfd4 Bot Updating Package Versions 2023-09-02 03:16:49 +00:00
Eric Nemchik
b1c1262a2c Add Namecheap DNS plugin
Signed-off-by: GitHub <noreply@github.com>
2023-08-28 14:38:34 +00:00
LinuxServer-CI
3b49643c78 Bot Updating Package Versions 2023-08-26 03:18:54 +00:00
Eric Nemchik
23728cba0b Move crontabs to etc
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-19 10:17:40 -05:00
Eric Nemchik
7e1db9c562 Crontabs folder created in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-19 08:42:48 -05:00
Eric Nemchik
919b8ac152 cron in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-18 23:38:31 -05:00
LinuxServer-CI
0f9d247ba4 Bot Updating Package Versions 2023-08-19 03:17:05 +00:00
LinuxServer-CI
cab0b86b65 Bot Updating Package Versions 2023-08-12 19:50:39 +00:00
Eric Nemchik
4d3875d37e Merge pull request #403 from linuxserver/freedns
Freedns
2023-08-12 14:45:40 -05:00
Eric Nemchik
badea52047 Add FreeDNS plugin
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-12 13:55:53 -05:00
Eric Nemchik
97baf76a10 Get available DNS Authenticator plugins from CLI
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-12 13:47:44 -05:00
LinuxServer-CI
6ed02e1e00 Bot Updating Package Versions 2023-08-12 03:18:10 +00:00
LinuxServer-CI
a6778ab7c7 Bot Updating Package Versions 2023-08-07 14:06:58 +00:00
LinuxServer-CI
95c791acfc Bot Updating Templated Files 2023-08-07 14:01:37 +00:00
Eric Nemchik
42ccafc064 Merge pull request #390 from ejach/certbot-dns-bunny
Added certbot-dns-bunny to allow Bunny dns verification
2023-08-07 09:00:03 -05:00
Eric Nemchik
6b7cdb26f1 Update readme-vars.yml 2023-08-07 08:46:20 -05:00
Evan J
e19a030eff Merge branch 'master' into certbot-dns-bunny 2023-08-07 09:08:36 -04:00
LinuxServer-CI
4d4cb0ca74 Bot Updating Package Versions 2023-08-05 03:18:48 +00:00
Eric Nemchik
0b738d9ee0 set owner of certbot folders to abc
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-07-31 15:13:43 -05:00
Eric Nemchik
269e9cdd3f Fix perms
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-07-30 09:50:18 -05:00
Eric Nemchik
17387674b8 standard cron
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-07-30 01:17:57 -05:00
Evan J
9554582962 Merge branch 'master' into certbot-dns-bunny 2023-07-29 08:00:04 -04:00
LinuxServer-CI
42ebe4a584 Bot Updating Package Versions 2023-07-29 00:21:48 +00:00
Eric Nemchik
b9f5763ee5 Merge pull request #398 from linuxserver/fix-ini-value-remove
Fix removing ini values
2023-07-28 19:17:06 -05:00
Eric Nemchik
2b0bf5869c Fix removing ini values
- missing -i flag
- use word boundary instead of space

Signed-off-by: GitHub <noreply@github.com>
2023-07-28 18:59:20 +00:00
Evan J
b46830f214 Merge branch 'master' into certbot-dns-bunny 2023-07-28 13:13:29 -04:00
LinuxServer-CI
66a8694772 Bot Updating Package Versions 2023-07-28 11:52:17 +00:00
LinuxServer-CI
33568e1bd3 Bot Updating Templated Files 2023-07-28 11:48:32 +00:00
Eric Nemchik
0004cd1ce8 Merge pull request #376 from gilesp/master
Adds certbot-dns-dreamhost to allow dreamhost dns verification
2023-07-28 06:46:11 -05:00
Giles Paterson
8dbd50ac06 Updates changelog date 2023-07-28 10:40:14 +01:00
Eric Nemchik
cae42496e2 Merge branch 'master' into certbot-dns-bunny 2023-07-27 09:44:46 -05:00
Eric Nemchik
2f8c5b4487 Merge branch 'master' into master 2023-07-27 09:32:01 -05:00
LinuxServer-CI
9f75c7a713 Bot Updating Package Versions 2023-07-27 14:24:01 +00:00
Eric Nemchik
262c1013aa Merge pull request #339 from linuxserver/certbot-revamp-config-file
Use config file with certbot
2023-07-27 09:20:30 -05:00
Eric Nemchik
54e4cfa047 Merge branch 'master' into certbot-revamp-config-file 2023-07-27 08:05:58 -05:00
LinuxServer-CI
97ba6a7de9 Bot Updating Package Versions 2023-07-22 03:17:29 +00:00
LinuxServer-CI
f11a753445 Bot Updating Package Versions 2023-07-15 03:33:59 +00:00
Eric Nemchik
ee6153c817 Merge branch 'master' into certbot-revamp-config-file 2023-07-10 18:45:22 -05:00
LinuxServer-CI
93424877a9 Bot Updating Package Versions 2023-07-08 03:32:56 +00:00
Evan J
eaf8b3648b Merge branch 'master' into certbot-dns-bunny 2023-07-03 14:32:18 +00:00
LinuxServer-CI
b754cedda2 Bot Updating Templated Files 2023-07-01 15:08:48 +00:00
Eric Nemchik
0d05560652 Merge pull request #393 from linuxserver/typo
Update readme-vars.yml
2023-07-01 10:06:35 -05:00
Eric Nemchik
7f9b637353 Update readme-vars.yml
Fix typo
2023-07-01 09:52:38 -05:00
LinuxServer-CI
675d67bbd4 Bot Updating Package Versions 2023-07-01 03:37:47 +00:00
LinuxServer-CI
402d513115 Bot Updating Templated Files 2023-07-01 03:33:10 +00:00
Evan J
fac669ea43 Added certbot-dns-bunny 2023-06-25 20:31:19 +01:00
LinuxServer-CI
3aab75dc8b Bot Updating Package Versions 2023-06-24 03:32:04 +00:00
LinuxServer-CI
b2e8d8c8ab Bot Updating Package Versions 2023-06-17 03:18:40 +00:00
Giles Paterson
973abbefbb Merge branch 'linuxserver:master' into master 2023-06-16 10:09:14 +01:00
LinuxServer-CI
dede63fdcf Bot Updating Package Versions 2023-06-10 03:19:40 +00:00
LinuxServer-CI
bee6793d45 Bot Updating Package Versions 2023-06-09 14:21:26 +00:00
Eric Nemchik
29e9daa606 Merge pull request #381 from linuxserver/suppress-not-replacing
Suppress cp: not replacing
2023-06-09 09:17:40 -05:00
LinuxServer-CI
57c0d1f81e Bot Updating Package Versions 2023-06-07 12:44:02 +00:00
Eric Nemchik
416bef8a2e Merge pull request #383 from linuxserver/php-auth
Add auth comments for php location
2023-06-07 07:39:45 -05:00
Eric Nemchik
500d5606e4 Update default.conf.sample date 2023-06-05 13:41:08 -05:00
Eric Nemchik
500fd0c634 Add auth comments for php location 2023-06-05 13:37:01 -05:00
LinuxServer-CI
adf38bcd2b Bot Updating Package Versions 2023-06-03 03:17:12 +00:00
Eric Nemchik
5255b117f9 Suppress cp: not replacing
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-06-01 19:09:13 -05:00
Eric Nemchik
d7a8d6cc6a Merge branch 'master' into certbot-revamp-config-file 2023-05-31 11:33:45 -05:00
Giles Paterson
d67459e852 Merge branch 'linuxserver:master' into master 2023-05-31 12:10:41 +01:00
Giles Paterson
0ddb5be5f5 adds dreamhost dns plugin 2023-05-31 12:08:48 +01:00
LinuxServer-CI
60f6fafc53 Bot Updating Package Versions 2023-05-31 04:10:29 +00:00
Eric Nemchik
d5c530af49 Merge pull request #375 from linuxserver/fail2ban-plex-regex
Remove broken fail2ban plex regex
2023-05-30 23:06:49 -05:00
Eric Nemchik
be215d62aa Remove broken fail2ban plex regex
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-05-30 21:38:25 -05:00
LinuxServer-CI
db54dfaf71 Bot Updating Package Versions 2023-05-30 14:17:31 +00:00
Eric Nemchik
0d70436ddb Merge pull request #372 from linuxserver/3.18
Rebase to Alpine 3.18, deprecate armhf
2023-05-30 09:12:36 -05:00
Eric Nemchik
49d848b639 Remove mailparse
Does not exist for php82 in alpine 3.18

Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-05-29 18:16:41 -05:00
Eric Nemchik
2df15e7b96 Merge remote-tracking branch 'origin/master' into 3.18
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-05-29 17:14:36 -05:00
Eric Nemchik
7a6c539527 Rebase to Alpine 3.18, deprecate armhf 2023-05-27 16:57:54 -05:00
LinuxServer-CI
230ad93b35 Bot Updating Package Versions 2023-05-27 03:20:24 +00:00
LinuxServer-CI
cc3e0b590e Bot Updating Templated Files 2023-05-27 03:16:34 +00:00
LinuxServer-CI
f9a5348035 Bot Updating Package Versions 2023-05-20 03:17:47 +00:00
LinuxServer-CI
ba685e7fd0 Bot Updating Package Versions 2023-05-18 14:13:47 +00:00
LinuxServer-CI
97782cdbed Bot Updating Package Versions 2023-05-17 15:54:17 +00:00
LinuxServer-CI
38bbfb2d01 Bot Updating Package Versions 2023-05-13 03:19:42 +00:00
LinuxServer-CI
5b492be3d7 Bot Updating Package Versions 2023-05-11 18:48:13 +00:00
Eric Nemchik
9d695718f0 Merge branch 'master' into certbot-revamp-config-file 2023-05-11 13:45:38 -05:00
Eric Nemchik
74069d4742 Merge pull request #366 from linuxserver/auth-updates
Simplify auth configs and fix Set-Cookie header bug
2023-05-11 13:44:19 -05:00
LinuxServer-CI
c77eca9ec3 Bot Updating Package Versions 2023-05-09 21:16:20 +00:00
Eric Nemchik
5b4a34c0e3 Merge branch 'master' into auth-updates 2023-05-07 09:20:27 -05:00
Eric Nemchik
908571dea8 Merge branch 'master' into certbot-revamp-config-file 2023-05-07 09:17:28 -05:00
LinuxServer-CI
10d1bf7b96 Bot Updating Package Versions 2023-05-06 03:20:14 +00:00
LinuxServer-CI
24f3353692 Bot Updating Package Versions 2023-04-29 03:20:15 +00:00
LinuxServer-CI
dee14d718b Bot Updating Templated Files 2023-04-29 03:17:04 +00:00
LinuxServer-CI
5438dbf13c Bot Updating Templated Files 2023-04-29 03:16:05 +00:00
Eric Nemchik
77b9dc3348 Unsimplify 2023-04-27 20:53:07 +00:00
Eric Nemchik
a2e3c8b9fb Backwards compatibility and additional cookie handling tweaks 2023-04-27 20:31:05 +00:00
Eric Nemchik
d8f252dd73 Adjust auth confs to fix cookie header conflict 2023-04-27 18:53:51 +00:00
Eric Nemchik
9cdedad1c8 Simplify auth configs and include updates for Authelia 4.38 2023-04-24 19:06:25 +00:00
Eric Nemchik
d7e2455e7a Merge remote-tracking branch 'origin/master' into certbot-revamp-config-file 2023-04-23 08:02:46 -05:00
LinuxServer-CI
2f740e60a8 Bot Updating Package Versions 2023-04-22 03:17:40 +00:00
LinuxServer-CI
cfb3fae7cf Bot Updating Package Versions 2023-04-21 18:28:44 +00:00
Eric Nemchik
ebd233860e Merge remote-tracking branch 'origin/master' into certbot-revamp-config-file 2023-03-10 15:10:35 +00:00
Eric Nemchik
5fb909d7dc Use existing EAB values for revoke
Attempt to revoke by name if cert path does not exist
2023-02-18 21:20:45 -06:00
Eric Nemchik
fd6d8764a2 Fix spelling 2023-02-18 19:40:43 -06:00
Eric Nemchik
ab7c85e4de Don't match whole line in cli.ini search for agree-tos 2023-02-18 19:35:33 -06:00
Eric Nemchik
d60847483d ensure config files exist and has at least one value set
set_ini_value does not work on empty files
2023-02-18 19:08:28 -06:00
Eric Nemchik
53bb2e284f Add descriptive comments to set_ini_value 2023-02-18 18:42:59 -06:00
Eric Nemchik
43e50ffb03 Rewrite domain handling
Use jq instead of python for ZeroSSL vars
2023-02-18 18:28:03 -06:00
Eric Nemchik
18019fb216 Adjust REV_ACMESERVER handling 2023-02-18 17:26:34 -06:00
Eric Nemchik
d57dffef82 Use config file with certbot 2023-02-18 10:05:06 -06:00
42 changed files with 1256 additions and 1179 deletions

View File

@@ -53,7 +53,6 @@ body:
options:
- x86-64
- arm64
- armhf
validations:
required: true
- type: textarea
@@ -68,10 +67,10 @@ body:
- type: textarea
attributes:
description: |
Provide a full docker log, output of "docker logs linuxserver.io"
Provide a full docker log, output of "docker logs swag"
label: Container logs
placeholder: |
Output of `docker logs linuxserver.io`
Output of `docker logs swag`
render: bash
validations:
required: true

View File

@@ -2,9 +2,11 @@ name: Issue & PR Tracker
on:
issues:
types: [opened,reopened,labeled,unlabeled]
types: [opened,reopened,labeled,unlabeled,closed]
pull_request_target:
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled]
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed]
pull_request_review:
types: [submitted,edited,dismissed]
jobs:
manage-project:

View File

@@ -7,20 +7,25 @@ jobs:
external-trigger-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
- name: External Trigger
if: github.ref == 'refs/heads/master'
run: |
printf "# External trigger for docker-swag\n\n" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_SWAG_MASTER }}" ]; then
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_SWAG_MASTER is set; skipping trigger. ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github secret \`PAUSE_EXTERNAL_TRIGGER_SWAG_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SWAG_MASTER\". ****"
echo "**** Retrieving external version ****"
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_SWAG_MASTER\`" >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/certbot/json" |jq -r '. | .info.version')
echo "Type is \`pip_version\`" >> $GITHUB_STEP_SUMMARY
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
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,
@@ -29,8 +34,8 @@ jobs:
exit 1
fi
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "**** External version: ${EXT_RELEASE} ****"
echo "**** Retrieving last pushed version ****"
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="linuxserver/swag"
tag="latest"
token=$(curl -sX GET \
@@ -57,32 +62,34 @@ jobs:
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
if [ -z "${IMAGE_VERSION}" ]; then
echo "**** Can't retrieve last pushed version, exiting ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve last pushed version for swag tag latest"
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"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
else
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "**** Attempting to change the Jenkins job description ****"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \

View File

@@ -2,42 +2,44 @@ name: External Trigger Scheduler
on:
schedule:
- cron: '50 * * * *'
- cron: '2 * * * *'
workflow_dispatch:
jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: External Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
echo "**** Pulling the yq docker image ****"
docker pull ghcr.io/linuxserver/yq
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
printf "# External trigger scheduler for docker-swag\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/jenkins-vars.yml \
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
if [ "$br" == "$ls_branch" ]; then
echo "**** Branch ${br} appears to be live; checking workflow. ****"
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/jenkins-vars.yml)
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-swag/actions/workflows/external_trigger.yml/dispatches
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
fi
done

View File

@@ -7,30 +7,34 @@ jobs:
package-trigger-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
- name: Package Trigger
if: github.ref == 'refs/heads/master'
run: |
printf "# Package trigger for docker-swag\n\n" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_SWAG_MASTER }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_SWAG_MASTER is set; skipping trigger. ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github secret \`PAUSE_PACKAGE_TRIGGER_SWAG_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_SWAG_MASTER\". ****"
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_SWAG_MASTER\`" >> $GITHUB_STEP_SUMMARY
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-swag/job/master/buildWithParameters?PACKAGE_CHECK=true \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "**** Attempting to change the Jenkins job description ****"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \

View File

@@ -9,26 +9,26 @@ jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Package Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
echo "**** Pulling the yq docker image ****"
docker pull ghcr.io/linuxserver/yq
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
printf "# Package trigger scheduler for docker-swag\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/jenkins-vars.yml \
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/jenkins-vars.yml | yq -r '.ls_branch')
if [ "${br}" == "${ls_branch}" ]; then
echo "**** Branch ${br} appears to be live; checking workflow. ****"
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-swag/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
triggered_branches="${triggered_branches}${br} "
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
@@ -37,10 +37,10 @@ jobs:
https://api.github.com/repos/linuxserver/docker-swag/actions/workflows/package_trigger.yml/dispatches
sleep 30
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
fi
done
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"

View File

@@ -5,6 +5,8 @@ on:
- '**/run'
- '**/finish'
- '**/check'
- 'root/migrations/*'
jobs:
permission_check:
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.20
# set version label
ARG BUILD_DATE
@@ -24,9 +24,10 @@ RUN \
openssl-dev \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
apk add --no-cache \
fail2ban \
gnupg \
iptables-legacy \
memcached \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
@@ -45,59 +46,52 @@ RUN \
nginx-mod-stream \
nginx-mod-stream-geoip2 \
nginx-vim \
php81-bcmath \
php81-bz2 \
php81-ctype \
php81-curl \
php81-dom \
php81-exif \
php81-ftp \
php81-gd \
php81-gmp \
php81-iconv \
php81-imap \
php81-intl \
php81-ldap \
php81-mysqli \
php81-mysqlnd \
php81-opcache \
php81-pdo_mysql \
php81-pdo_odbc \
php81-pdo_pgsql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-apcu \
php81-pecl-mailparse \
php81-pecl-memcached \
php81-pecl-redis \
php81-pgsql \
php81-phar \
php81-posix \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-tokenizer \
php81-xmlreader \
php81-xsl \
php81-zip \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-mcrypt \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl \
whois && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php81-pecl-mcrypt \
php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
fi && \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \
certbot-dns-aliyun \
certbot-dns-azure \
certbot-dns-bunny \
certbot-dns-cloudflare \
certbot-dns-cpanel \
certbot-dns-desec \
@@ -108,12 +102,14 @@ RUN \
certbot-dns-dnspod \
certbot-dns-do \
certbot-dns-domeneshop \
certbot-dns-dreamhost \
certbot-dns-duckdns \
certbot-dns-dynu \
certbot-dns-dynudns \
certbot-dns-freedns \
certbot-dns-gehirn \
certbot-dns-glesys \
certbot-dns-godaddy \
certbot-dns-google \
certbot-dns-google-domains \
certbot-dns-he \
certbot-dns-hetzner \
certbot-dns-infomaniak \
@@ -122,6 +118,7 @@ RUN \
certbot-dns-linode \
certbot-dns-loopia \
certbot-dns-luadns \
certbot-dns-namecheap \
certbot-dns-netcup \
certbot-dns-njalla \
certbot-dns-nsone \
@@ -147,6 +144,8 @@ RUN \
sed -i \
's|#ssl_trusted_certificate /config/keys/cert.crt;|ssl_trusted_certificate /config/keys/cert.crt;|' \
/defaults/nginx/ssl.conf.sample && \
echo "**** remove stream.conf ****" && \
rm -f /etc/nginx/conf.d/stream.conf && \
echo "**** correct ip6tables legacy issue ****" && \
rm \
/sbin/ip6tables && \
@@ -170,6 +169,7 @@ RUN \
tar xf \
/tmp/proxy-confs.tar.gz -C \
/defaults/nginx/proxy-confs --strip-components=1 --exclude=linux*/.editorconfig --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.20
# set version label
ARG BUILD_DATE
@@ -24,9 +24,10 @@ RUN \
openssl-dev \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
apk add --no-cache \
fail2ban \
gnupg \
iptables-legacy \
memcached \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
@@ -45,59 +46,52 @@ RUN \
nginx-mod-stream \
nginx-mod-stream-geoip2 \
nginx-vim \
php81-bcmath \
php81-bz2 \
php81-ctype \
php81-curl \
php81-dom \
php81-exif \
php81-ftp \
php81-gd \
php81-gmp \
php81-iconv \
php81-imap \
php81-intl \
php81-ldap \
php81-mysqli \
php81-mysqlnd \
php81-opcache \
php81-pdo_mysql \
php81-pdo_odbc \
php81-pdo_pgsql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-apcu \
php81-pecl-mailparse \
php81-pecl-memcached \
php81-pecl-redis \
php81-pgsql \
php81-phar \
php81-posix \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-tokenizer \
php81-xmlreader \
php81-xsl \
php81-zip \
php83-bcmath \
php83-bz2 \
php83-dom \
php83-exif \
php83-ftp \
php83-gd \
php83-gmp \
php83-imap \
php83-intl \
php83-ldap \
php83-mysqli \
php83-mysqlnd \
php83-opcache \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-apcu \
php83-pecl-mcrypt \
php83-pecl-memcached \
php83-pecl-redis \
php83-pgsql \
php83-posix \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-tokenizer \
php83-xmlreader \
php83-xsl \
whois && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php81-pecl-mcrypt \
php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
fi && \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \
certbot-dns-aliyun \
certbot-dns-azure \
certbot-dns-bunny \
certbot-dns-cloudflare \
certbot-dns-cpanel \
certbot-dns-desec \
@@ -108,12 +102,14 @@ RUN \
certbot-dns-dnspod \
certbot-dns-do \
certbot-dns-domeneshop \
certbot-dns-dreamhost \
certbot-dns-duckdns \
certbot-dns-dynu \
certbot-dns-dynudns \
certbot-dns-freedns \
certbot-dns-gehirn \
certbot-dns-glesys \
certbot-dns-godaddy \
certbot-dns-google \
certbot-dns-google-domains \
certbot-dns-he \
certbot-dns-hetzner \
certbot-dns-infomaniak \
@@ -122,6 +118,7 @@ RUN \
certbot-dns-linode \
certbot-dns-loopia \
certbot-dns-luadns \
certbot-dns-namecheap \
certbot-dns-netcup \
certbot-dns-njalla \
certbot-dns-nsone \
@@ -147,6 +144,8 @@ RUN \
sed -i \
's|#ssl_trusted_certificate /config/keys/cert.crt;|ssl_trusted_certificate /config/keys/cert.crt;|' \
/defaults/nginx/ssl.conf.sample && \
echo "**** remove stream.conf ****" && \
rm -f /etc/nginx/conf.d/stream.conf && \
echo "**** correct ip6tables legacy issue ****" && \
rm \
/sbin/ip6tables && \
@@ -170,6 +169,7 @@ RUN \
tar xf \
/tmp/proxy-confs.tar.gz -C \
/defaults/nginx/proxy-confs --strip-components=1 --exclude=linux*/.editorconfig --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \

View File

@@ -1,186 +0,0 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CERTBOT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="nemchik"
# environment settings
ENV DHLEVEL=2048 ONLY_SUBDOMAINS=false AWS_CONFIG_FILE=/config/dns-conf/route53.ini
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
build-base \
cargo \
libffi-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
fail2ban \
gnupg \
memcached \
nginx-mod-http-brotli \
nginx-mod-http-dav-ext \
nginx-mod-http-echo \
nginx-mod-http-fancyindex \
nginx-mod-http-geoip2 \
nginx-mod-http-headers-more \
nginx-mod-http-image-filter \
nginx-mod-http-perl \
nginx-mod-http-redis2 \
nginx-mod-http-set-misc \
nginx-mod-http-upload-progress \
nginx-mod-http-xslt-filter \
nginx-mod-mail \
nginx-mod-rtmp \
nginx-mod-stream \
nginx-mod-stream-geoip2 \
nginx-vim \
php81-bcmath \
php81-bz2 \
php81-ctype \
php81-curl \
php81-dom \
php81-exif \
php81-ftp \
php81-gd \
php81-gmp \
php81-iconv \
php81-imap \
php81-intl \
php81-ldap \
php81-mysqli \
php81-mysqlnd \
php81-opcache \
php81-pdo_mysql \
php81-pdo_odbc \
php81-pdo_pgsql \
php81-pdo_sqlite \
php81-pear \
php81-pecl-apcu \
php81-pecl-mailparse \
php81-pecl-memcached \
php81-pecl-redis \
php81-pgsql \
php81-phar \
php81-posix \
php81-soap \
php81-sockets \
php81-sodium \
php81-sqlite3 \
php81-tokenizer \
php81-xmlreader \
php81-xsl \
php81-zip \
whois && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php81-pecl-mcrypt \
php81-pecl-xmlrpc && \
echo "**** install certbot plugins ****" && \
if [ -z ${CERTBOT_VERSION+x} ]; then \
CERTBOT_VERSION=$(curl -sL https://pypi.python.org/pypi/certbot/json |jq -r '. | .info.version'); \
fi && \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
certbot==${CERTBOT_VERSION} \
certbot-dns-acmedns \
certbot-dns-aliyun \
certbot-dns-azure \
certbot-dns-cloudflare \
certbot-dns-cpanel \
certbot-dns-desec \
certbot-dns-digitalocean \
certbot-dns-directadmin \
certbot-dns-dnsimple \
certbot-dns-dnsmadeeasy \
certbot-dns-dnspod \
certbot-dns-do \
certbot-dns-domeneshop \
certbot-dns-duckdns \
certbot-dns-dynu \
certbot-dns-gehirn \
certbot-dns-godaddy \
certbot-dns-google \
certbot-dns-google-domains \
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 \
certbot-dns-nsone \
certbot-dns-ovh \
certbot-dns-porkbun \
certbot-dns-rfc2136 \
certbot-dns-route53 \
certbot-dns-sakuracloud \
certbot-dns-standalone \
certbot-dns-transip \
certbot-dns-vultr \
certbot-plugin-gandi \
cryptography \
future \
requests && \
echo "**** enable OCSP stapling from base ****" && \
sed -i \
's|#ssl_stapling on;|ssl_stapling on;|' \
/defaults/nginx/ssl.conf.sample && \
sed -i \
's|#ssl_stapling_verify on;|ssl_stapling_verify on;|' \
/defaults/nginx/ssl.conf.sample && \
sed -i \
's|#ssl_trusted_certificate /config/keys/cert.crt;|ssl_trusted_certificate /config/keys/cert.crt;|' \
/defaults/nginx/ssl.conf.sample && \
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 && \
echo "**** copy fail2ban default action and filter to /defaults ****" && \
mkdir -p /defaults/fail2ban && \
mv /etc/fail2ban/action.d /defaults/fail2ban/ && \
mv /etc/fail2ban/filter.d /defaults/fail2ban/ && \
echo "**** define allowipv6 to silence warning ****" && \
sed -i 's/#allowipv6 = auto/allowipv6 = auto/g' /etc/fail2ban/fail2ban.conf && \
echo "**** copy proxy confs to /defaults ****" && \
mkdir -p \
/defaults/nginx/proxy-confs && \
curl -o \
/tmp/proxy-confs.tar.gz -L \
"https://github.com/linuxserver/reverse-proxy-confs/tarball/master" && \
tar xf \
/tmp/proxy-confs.tar.gz -C \
/defaults/nginx/proxy-confs --strip-components=1 --exclude=linux*/.editorconfig --exclude=linux*/.gitattributes --exclude=linux*/.github --exclude=linux*/.gitignore --exclude=linux*/LICENSE && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
$HOME/.cache \
$HOME/.cargo
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config

576
Jenkinsfile vendored
View File

@@ -16,7 +16,9 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key')
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
EXT_PIP = 'certbot'
BUILD_VERSION_ARG = 'CERTBOT_VERSION'
LS_USER = 'linuxserver'
@@ -37,13 +39,33 @@ pipeline {
CI_WEBPATH=''
}
stages {
stage("Set git config"){
steps{
sh '''#!/bin/bash
cat ${GIT_SIGNING_KEY} > /config/.ssh/id_sign
chmod 600 /config/.ssh/id_sign
ssh-keygen -y -f /config/.ssh/id_sign > /config/.ssh/id_sign.pub
echo "Using $(ssh-keygen -lf /config/.ssh/id_sign) to sign commits"
git config --global gpg.format ssh
git config --global user.signingkey /config/.ssh/id_sign
git config --global commit.gpgsign true
'''
}
}
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
echo "Running on node: ${NODE_NAME}"
sh '''#! /bin/bash
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || : '''
script{
env.EXIT_STATUS = ''
env.LS_RELEASE = sh(
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
@@ -54,11 +76,16 @@ pipeline {
env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''',
returnStdout: true).trim()
env.GH_DEFAULT_BRANCH = sh(
script: '''git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||' ''',
returnStdout: true).trim()
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml ./root/donate.txt'
}
sh '''#! /bin/bash
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
script{
env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
@@ -115,7 +142,7 @@ pipeline {
steps{
script{
env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/ ]//g' ''',
returnStdout: true).trim()
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
@@ -133,7 +160,7 @@ pipeline {
}
if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
if (BRANCH_NAME != "${env.GH_DEFAULT_BRANCH}") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
}
println("SEMVER: ${env.SEMVER}")
@@ -157,7 +184,7 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
@@ -180,7 +207,7 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
@@ -203,12 +230,12 @@ pipeline {
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
}
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
@@ -228,15 +255,17 @@ pipeline {
script{
env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml'
}
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-jenkins-builder/master/checkrun.sh | /bin/bash'''
sh '''#! /bin/bash
docker run --rm \
-v ${WORKSPACE}:/mnt \
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache py3-pip && \
pip install s3cmd && \
ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache python3 && \
python3 -m venv /lsiopy && \
pip install --no-cache-dir -U pip && \
pip install --no-cache-dir s3cmd && \
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
}
}
@@ -255,8 +284,15 @@ pipeline {
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
# Stage 1 - Jenkinsfile update
# Cloned repo paths for templating:
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch master of ${LS_USER}/${LS_REPO} for running the jenkins builder on
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch master of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
echo "Starting 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}
@@ -265,15 +301,16 @@ pipeline {
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
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile"
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
echo "Starting Stage 2 - Delete old templates"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
@@ -289,15 +326,16 @@ pipeline {
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
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old and deprecated templates"
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# Stage 3 - Update templates
echo "Starting Stage 3 - Update templates"
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
@@ -310,36 +348,58 @@ pipeline {
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cp --parents readme-vars.yml ${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 readme-vars.yml ${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 pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "No templates to update"
fi
mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md
echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub"
mkdir -p ${TEMPDIR}/docs
git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
cd ${TEMPDIR}/docs/docker-documentation
GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
git add docs/images/docker-${CONTAINER_NAME}.md
echo "Updating docs repo"
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} || \
(MAXWAIT="10" && echo "Push to docs failed, trying again in ${MAXWAIT} seconds" && \
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH})
else
echo "Docs update not needed, skipping"
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
git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
elif [[ -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 [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -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
echo "Updating Unraid template"
cd ${TEMPDIR}/unraid/templates/
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
if grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
echo "Image is on the ignore list, and already in the deprecation folder."
elif grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
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
@@ -350,7 +410,42 @@ pipeline {
git add unraid/${CONTAINER_NAME}.xml
git commit -m 'Bot Updating Unraid Template'
fi
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} || \
(MAXWAIT="10" && echo "Push to unraid templates failed, trying again in ${MAXWAIT} seconds" && \
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH})
else
echo "No updates to Unraid template needed, skipping"
fi
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then
if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) -gt 25000 ]]; then
echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite"
else
echo "Syncing readme to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/README.md"
fi
if curl -s https://hub.docker.com/v2/namespaces/${DOCKERHUB_IMAGE%%/*}/repositories/${DOCKERHUB_IMAGE##*/}/tags | jq -r '.message' | grep -q 404; then
echo "Docker Hub endpoint doesn't exist. Creating endpoint first."
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"'${DOCKERHUB_IMAGE##*/}'", "namespace":"'${DOCKERHUB_IMAGE%%/*}'"}' \
https://hub.docker.com/v2/repositories/ || :
fi
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X PATCH \
-d "{\\"full_description\\":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || :
else
echo "Not the default Github branch. Skipping readme sync to Docker Hub."
fi
rm -Rf ${TEMPDIR}'''
script{
@@ -376,54 +471,48 @@ pipeline {
}
}
}
// If this is a master build check the S6 service file perms
stage("Check S6 Service file Permissions"){
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
script{
sh '''#! /bin/bash
WRONG_PERM=$(find ./ -path "./.git" -prune -o \\( -name "run" -o -name "finish" -o -name "check" \\) -not -perm -u=x,g=x,o=x -print)
if [[ -n "${WRONG_PERM}" ]]; then
echo "The following S6 service files are missing the executable bit; canceling the faulty build: ${WRONG_PERM}"
exit 1
else
echo "S6 service file perms look good."
fi '''
}
}
}
/* #######################
GitLab Mirroring
GitLab Mirroring and Quay.io Repo Visibility
####################### */
// Ping into Gitlab to mirror this repo and have a registry endpoint
stage("GitLab Mirror"){
// Ping into Gitlab to mirror this repo and have a registry endpoint & mark this repo on Quay.io as public
stage("GitLab Mirror and Quay.io Visibility"){
when {
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
}
}
/* #######################
Scarf.sh package registry
####################### */
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "master"
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''#! /bin/bash
set -e
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"
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",\
"shortDescription":"example description",\
"libraryType":"docker",\
"website":"https://github.com/linuxserver/docker-swag",\
"backendUrl":"https://ghcr.io/linuxserver/swag",\
"publicUrl":"https://lscr.io/linuxserver/swag"}' || :
else
echo "Package already exists on Scarf.sh"
fi
'''
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
sh '''curl -H "Private-Token: ${GITLAB_TOKEN}" -X PUT "https://gitlab.com/api/v4/projects/Linuxserver.io%2F${LS_REPO}" \
-d "mirror=true&import_url=https://github.com/linuxserver/${LS_REPO}.git" '''
sh '''curl -H "Content-Type: application/json" -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" -X POST "https://quay.io/api/v1/repository${QUAYIMAGE/quay.io/}/changevisibility" \
-d '{"visibility":"public"}' ||: '''
}
}
/* ###############
@@ -454,6 +543,7 @@ pipeline {
--label \"org.opencontainers.image.title=Swag\" \
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
@@ -485,44 +575,10 @@ pipeline {
--label \"org.opencontainers.image.title=Swag\" \
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
stage('Build ARMHF') {
agent {
label 'ARMHF'
}
steps {
echo "Running on node: ${NODE_NAME}"
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.armhf"
sh "docker buildx build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
--label \"org.opencontainers.image.authors=linuxserver.io\" \
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-swag/packages\" \
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-swag\" \
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-swag\" \
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Swag\" \
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} --platform=linux/arm/v7 \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
}
sh '''docker rmi \
${IMAGE}:arm32v7-${META_TAG} \
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
}
stage('Build ARM64') {
agent {
label 'ARM64'
@@ -548,14 +604,18 @@ pipeline {
--label \"org.opencontainers.image.title=Swag\" \
--label \"org.opencontainers.image.description=SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx webserver and reverse proxy with php support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.\" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
retry_backoff(5,5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
}
sh '''docker rmi \
${IMAGE}:arm64v8-${META_TAG} \
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
sh '''#! /bin/bash
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || : '''
}
}
}
@@ -571,7 +631,7 @@ pipeline {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" != "true" ]; then
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
else
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
@@ -592,7 +652,8 @@ pipeline {
wait
git add package_versions.txt
git commit -m 'Bot Updating Package Versions'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process"
else
@@ -616,13 +677,6 @@ pipeline {
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''#! /bin/bash
echo "Packages were updated. Cleaning up the image and exiting."
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
docker rmi ${IMAGE}:amd64-${META_TAG}
else
docker rmi ${IMAGE}:${META_TAG}
fi'''
script{
env.EXIT_STATUS = 'ABORTED'
}
@@ -640,13 +694,6 @@ pipeline {
}
}
steps {
sh '''#! /bin/bash
echo "There are no package updates. Cleaning up the image and exiting."
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
docker rmi ${IMAGE}:amd64-${META_TAG}
else
docker rmi ${IMAGE}:${META_TAG}
fi'''
script{
env.EXIT_STATUS = 'ABORTED'
}
@@ -668,21 +715,20 @@ pipeline {
]) {
script{
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
}
sh '''#! /bin/bash
set -e
docker pull ghcr.io/linuxserver/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
docker run --rm \
--shm-size=1gb \
-v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e PORT=\"${CI_PORT}\" \
@@ -694,8 +740,6 @@ pipeline {
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/ci:latest \
python3 test_build.py'''
}
@@ -712,12 +756,6 @@ pipeline {
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
@@ -725,10 +763,10 @@ pipeline {
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
@@ -743,22 +781,11 @@ pipeline {
docker push ${PUSHIMAGE}:${META_TAG}
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${PUSHIMAGE}:${SEMVER}
docker push ${PUSHIMAGE}:${SEMVER}
fi
done
'''
}
sh '''#! /bin/bash
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker rmi \
${DELETEIMAGE}:${META_TAG} \
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
${DELETEIMAGE}:latest || :
if [ -n "${SEMVER}" ]; then
docker rmi ${DELETEIMAGE}:${SEMVER} || :
fi
done
'''
}
}
}
@@ -770,12 +797,6 @@ pipeline {
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
@@ -783,98 +804,49 @@ pipeline {
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [ "${CI}" == "false" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
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}:amd64-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:amd64-latest
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-latest
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-latest
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
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
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
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
done
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
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}
if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
done
'''
}
sh '''#! /bin/bash
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker rmi \
${DELETEIMAGE}:amd64-${META_TAG} \
${DELETEIMAGE}:amd64-latest \
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:arm32v7-${META_TAG} \
${DELETEIMAGE}:arm32v7-latest \
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:arm64v8-${META_TAG} \
${DELETEIMAGE}:arm64v8-latest \
${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} \
ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :
'''
}
}
}
@@ -895,7 +867,7 @@ pipeline {
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
@@ -908,49 +880,117 @@ pipeline {
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
}
}
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
// Add protection to the release branch
stage('Github-Release-Branch-Protection') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
docker pull ghcr.io/linuxserver/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
rm -Rf ${TEMPDIR} '''
}
echo "Setting up protection for release branch master"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/master/protection \
-d $(jq -c . << EOF
{
"required_status_checks": null,
"enforce_admins": false,
"required_pull_request_reviews": {
"dismiss_stale_reviews": false,
"require_code_owner_reviews": false,
"require_last_push_approval": false,
"required_approving_review_count": 1
},
"restrictions": null,
"required_linear_history": false,
"allow_force_pushes": false,
"allow_deletions": false,
"block_creations": false,
"required_conversation_resolution": true,
"lock_branch": false,
"allow_fork_syncing": false,
"required_signatures": false
}
EOF
) '''
}
}
// If this is a Pull request send the CI link as a comment on it
stage('Pull Request Comment') {
when {
not {environment name: 'CHANGE_ID', value: ''}
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \
-d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' '''
sh '''#! /bin/bash
# Function to retrieve JSON data from URL
get_json() {
local url="$1"
local response=$(curl -s "$url")
if [ $? -ne 0 ]; then
echo "Failed to retrieve JSON data from $url"
return 1
fi
local json=$(echo "$response" | jq .)
if [ $? -ne 0 ]; then
echo "Failed to parse JSON data from $url"
return 1
fi
echo "$json"
}
build_table() {
local data="$1"
# Get the keys in the JSON data
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
# Check if keys are empty
if [ -z "$keys" ]; then
echo "JSON report data does not contain any keys or the report does not exist."
return 1
fi
# Build table header
local header="| Tag | Passed |\\n| --- | --- |\\n"
# Loop through the JSON data to build the table rows
local rows=""
for build in $keys; do
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
if [ "$status" = "true" ]; then
status="✅"
else
status="❌"
fi
local row="| "$build" | "$status" |\\n"
rows="${rows}${row}"
done
local table="${header}${rows}"
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
echo "$escaped_table"
}
if [[ "${CI}" = "true" ]]; then
# Retrieve JSON data from URL
data=$(get_json "$CI_JSON_URL")
# Create table from JSON data
table=$(build_table "$data")
echo -e "$table"
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
else
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
fi
'''
}
}
}
@@ -959,6 +999,13 @@ pipeline {
###################### */
post {
always {
sh '''#!/bin/bash
rm -rf /config/.ssh/id_sign
rm -rf /config/.ssh/id_sign.pub
git config --global --unset gpg.format
git config --global --unset user.signingkey
git config --global --unset commit.gpgsign
'''
script{
if (env.EXIT_STATUS == "ABORTED"){
sh 'echo "build aborted"'
@@ -976,7 +1023,32 @@ pipeline {
}
}
cleanup {
sh '''#! /bin/bash
echo "Performing docker system prune!!"
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
docker stop ${containers}
fi
docker system prune -af --volumes || :
'''
cleanWs()
}
}
}
def retry_backoff(int max_attempts, int power_base, Closure c) {
int n = 0
while (n < max_attempts) {
try {
c()
return
} catch (err) {
if ((n + 1) >= max_attempts) {
throw err
}
sleep(power_base ** n)
n++
}
}
return
}

187
README.md
View File

@@ -1,6 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the https://github.com/linuxserver/docker-swag/blob/master/.github/CONTRIBUTING.md -->
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker-swag/blob/master/.github/CONTRIBUTING.md -->
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
@@ -29,7 +28,7 @@ Find us at:
# [linuxserver/swag](https://github.com/linuxserver/docker-swag)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fswag?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fswag)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fswag?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-swag.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-swag)
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-swag.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-swag/releases)
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-swag/packages)
@@ -46,7 +45,7 @@ SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relatio
## Supported Architectures
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://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
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.
@@ -56,7 +55,7 @@ The architectures supported by this image are:
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf | | arm32v7-\<version tag\> |
| armhf | | |
## Application Setup
@@ -68,13 +67,28 @@ The architectures supported by this image are:
* For `dns` validation, make sure to enter your credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`
* Cloudflare provides free accounts for managing dns and is very easy to use with this image. Make sure that it is set up for "dns only" instead of "dns + proxy"
* Google dns plugin is meant to be used with "Google Cloud DNS", a paid enterprise product, and not for "Google Domains DNS"
* DuckDNS only supoprts two types of DNS validated certificates (not both at the same time):
* DuckDNS only supports two types of DNS validated certificates (not both at the same time):
1. Certs that only cover your main subdomain (ie. `yoursubdomain.duckdns.org`, leave the `SUBDOMAINS` variable empty)
2. Certs that cover sub-subdomains of your main subdomain (ie. `*.yoursubdomain.duckdns.org`, set the `SUBDOMAINS` variable to `wildcard`)
* `--cap-add=NET_ADMIN` is required for fail2ban to modify iptables
* After setup, navigate to `https://yourdomain.url` to access the default homepage (http access through port 80 is disabled by default, you can enable it by editing the default site config at `/config/nginx/site-confs/default.conf`).
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from Let's Encrypt in those circumstances.
### Certbot Plugins
SWAG includes many Certbot plugins out of the box, but not all plugins can be included.
If you need a plugin that is not included, the quickest way to have the plugin available is to use our [Universal Package Install Docker Mod](https://github.com/linuxserver/docker-mods/tree/universal-package-install).
Set the following environment variables on your container:
```yaml
DOCKER_MODS=linuxserver/mods:universal-package-install
INSTALL_PIP_PACKAGES=certbot-dns-<plugin>
```
Set the required credentials (usually found in the plugin documentation) in `/config/dns-conf/<plugin>.ini`.
It is recommended to attempt obtaining a certificate with `STAGING=true` first to make sure the plugin is working as expected.
### Security and password protection
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
@@ -138,13 +152,12 @@ Please follow the instructions [on this blog post](https://www.linuxserver.io/bl
## Usage
Here are some example snippets to help you get started creating a container.
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
```yaml
---
version: "2.1"
services:
swag:
image: lscr.io/linuxserver/swag:latest
@@ -166,7 +179,7 @@ services:
- EXTRA_DOMAINS= #optional
- STAGING=false #optional
volumes:
- /path/to/appdata/config:/config
- /path/to/swag/config:/config
ports:
- 443:443
- 80:80 #optional
@@ -194,15 +207,14 @@ docker run -d \
-e STAGING=false `#optional` \
-p 443:443 \
-p 80:80 `#optional` \
-v /path/to/appdata/config:/config \
-v /path/to/swag/config:/config \
--restart unless-stopped \
lscr.io/linuxserver/swag:latest
```
## Parameters
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
| Parameter | Function |
| :----: | --- |
@@ -215,13 +227,13 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e VALIDATION=http` | Certbot validation method to use, options are `http` or `dns` (`dns` method also requires `DNSPLUGIN` variable set). |
| `-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` 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 `acmedns`, `aliyun`, `azure`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `duckdns`, `dynu`, `gandi`, `gehirn`, `godaddy`, `google`, `google-domains`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `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 DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `acmedns`, `aliyun`, `azure`, `bunny`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `dreamhost`, `duckdns`, `dynudns`, `freedns`, `gandi`, `gehirn`, `glesys`, `godaddy`, `google`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `namecheap`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `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 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. |
| `-v /config` | All the config files including the webroot reside here. |
| `-v /config` | Persistent config files |
### Portainer notice
@@ -234,10 +246,10 @@ You can set any environment variable from a file by using a special prepend `FIL
As an example:
```bash
-e FILE__PASSWORD=/run/secrets/mysecretpassword
-e FILE__MYVAR=/run/secrets/mysecretvariable
```
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
## Umask for running applications
@@ -246,15 +258,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
## User / Group Identifiers
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
```bash
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
id your_user
```
Example output:
```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
```
## Docker Mods
@@ -265,53 +282,100 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
## Support Info
* Shell access whilst the container is running: `docker exec -it swag /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f swag`
* 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:latest`
* Shell access whilst the container is running:
```bash
docker exec -it swag /bin/bash
```
* To monitor the logs of the container in realtime:
```bash
docker logs -f swag
```
* Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' swag
```
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/swag:latest
```
## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers:
### Via Docker Compose
* Update all images: `docker-compose pull`
* or update a single image: `docker-compose pull swag`
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d swag`
* You can also remove the old dangling images: `docker image prune`
* Update images:
* All images:
```bash
docker-compose pull
```
* Single image:
```bash
docker-compose pull swag
```
* Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d swag
```
* You can also remove the old dangling images:
```bash
docker image prune
```
### Via Docker Run
* Update the image: `docker pull lscr.io/linuxserver/swag:latest`
* Stop the running container: `docker stop swag`
* Delete the container: `docker rm swag`
* Update the image:
```bash
docker pull lscr.io/linuxserver/swag:latest
```
* Stop the running container:
```bash
docker stop swag
```
* Delete the container:
```bash
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)
* You can also remove the old dangling images: `docker image prune`
* You can also remove the old dangling images:
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once swag
```
* You can also remove the old dangling images: `docker image prune`
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
```bash
docker image prune
```
### Image Update Notifications - Diun (Docker Image Update Notifier)
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
## Building locally
@@ -336,6 +400,25 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **24.07.14:** - Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings.
* **01.07.24:** - Fall back to iptables-legacy if iptables doesn't work.
* **23.03.24:** - Fix perms on the generated `priv-fullchain-bundle.pem`.
* **14.03.24:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-location.conf, authelia-server.conf - Update Authelia conf samples with support for 4.38.
* **11.03.24:** - Restore support for DynuDNS using `certbot-dns-dynudns`.
* **06.03.24:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Cleanup default site conf.
* **04.03.24:** - Remove `stream.conf` inside the container to allow users to include their own block in `nginx.conf`.
* **23.01.24:** - Rebase to Alpine 3.19 with php 8.3, add root periodic crontabs for logrotate.
* **01.01.24:** - Add GleSYS DNS plugin.
* **11.12.23:** - Deprecate certbot-dns-dynu to resolve dependency conflicts with other plugins.
* **30.11.23:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404.
* **23.11.23:** - Run certbot as root to allow fix http validation.
* **01.10.23:** - Fix "unrecognized arguments" issue in DirectAdmin DNS plugin.
* **28.08.23:** - Add Namecheap DNS plugin.
* **12.08.23:** - Add FreeDNS plugin. Detect certbot DNS authenticators using CLI.
* **07.08.23:** - Add Bunny DNS Configuration.
* **27.07.23:** - Added support for dreamhost validation.
* **25.05.23:** - Rebase to Alpine 3.18, deprecate armhf.
* **27.04.23:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-location.conf, authelia-server.conf, authentik-location.conf, authentik-server.conf - Simplify auth configs and fix Set-Cookie header bug.
* **13.04.23:** - [Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, authelia-location.conf, authentik-location.conf, and site-confs/default.conf - Move ssl.conf include to default.conf. Remove Authorization headers in authelia. Sort proxy_set_header in authelia and authentik.
* **25.03.23:** - Fix renewal post hook.
* **10.03.23:** - Cleanup unused csr and keys folders. See [certbot 2.3.0 release notes](https://github.com/certbot/certbot/releases/tag/v2.3.0).

View File

@@ -1,340 +1,362 @@
NAME VERSION TYPE
ConfigArgParse 1.5.3 python
PyJWT 2.6.0 python
PyYAML 6.0 python
acme 2.5.0 python
alpine-baselayout 3.4.0-r0 apk
alpine-baselayout-data 3.4.0-r0 apk
alpine-keys 2.4-r1 apk
alpine-release 3.17.3-r0 apk
aom-libs 3.5.0-r0 apk
apache2-utils 2.4.57-r0 apk
apk-tools 2.12.10-r1 apk
apr 1.7.2-r0 apk
apr-util 1.6.3-r0 apk
argon2-libs 20190702-r2 apk
attrs 23.1.0 python
azure-common 1.1.28 python
azure-core 1.26.4 python
azure-identity 1.12.0 python
azure-mgmt-core 1.4.0 python
azure-mgmt-dns 8.0.0 python
bash 5.2.15-r0 apk
beautifulsoup4 4.12.2 python
boto3 1.26.115 python
botocore 1.29.115 python
brotli-libs 1.0.9-r9 apk
bs4 0.0.1 python
busybox 1.35.0 binary
busybox 1.35.0-r29 apk
busybox-binsh 1.35.0-r29 apk
c-client 2007f-r14 apk
ca-certificates 20220614-r4 apk
ca-certificates-bundle 20220614-r4 apk
cachetools 5.3.0 python
certbot 2.5.0 python
certbot-dns-acmedns 0.1.0 python
certbot-dns-aliyun 2.0.0 python
certbot-dns-azure 2.1.0 python
certbot-dns-cloudflare 2.5.0 python
certbot-dns-cpanel 0.4.0 python
certbot-dns-desec 1.2.1 python
certbot-dns-digitalocean 2.5.0 python
certbot-dns-directadmin 1.0.3 python
certbot-dns-dnsimple 2.5.0 python
certbot-dns-dnsmadeeasy 2.5.0 python
certbot-dns-dnspod 0.1.0 python
certbot-dns-do 0.31.0 python
certbot-dns-domeneshop 0.2.9 python
certbot-dns-duckdns 1.3 python
certbot-dns-dynu 0.0.4 python
certbot-dns-gehirn 2.5.0 python
certbot-dns-godaddy 0.2.2 python
certbot-dns-google 2.5.0 python
certbot-dns-google-domains 0.1.11 python
certbot-dns-he 1.0.0 python
certbot-dns-hetzner 2.0.0 python
certbot-dns-infomaniak 0.2.1 python
certbot-dns-inwx 2.2.0 python
certbot-dns-ionos 2022.11.24 python
certbot-dns-linode 2.5.0 python
certbot-dns-loopia 1.0.1 python
certbot-dns-luadns 2.5.0 python
certbot-dns-netcup 1.2.0 python
certbot-dns-njalla 1.0.0 python
certbot-dns-nsone 2.5.0 python
certbot-dns-ovh 2.5.0 python
certbot-dns-porkbun 0.8 python
certbot-dns-rfc2136 2.5.0 python
certbot-dns-route53 2.5.0 python
certbot-dns-sakuracloud 2.5.0 python
certbot-dns-standalone 1.1 python
certbot-dns-transip 0.5.2 python
certbot-dns-vultr 1.0.3 python
certbot-plugin-gandi 1.4.3 python
certifi 2022.12.7 python
cffi 1.15.1 python
charset-normalizer 3.1.0 python
cloudflare 2.11.1 python
configobj 5.0.8 python
coreutils 9.1-r0 apk
cryptography 40.0.2 python
curl 8.0.1-r0 apk
dataclasses-json 0.5.7 python
distro 1.8.0 python
dns-lexicon 3.11.7 python
dnslib 0.9.23 python
dnspython 2.3.0 python
domeneshop 0.4.3 python
fail2ban 1.0.2 python
fail2ban 1.0.2-r0 apk
filelock 3.11.0 python
fontconfig 2.14.1-r0 apk
freetype 2.12.1-r0 apk
future 0.18.3 python
gdbm 1.23-r0 apk
git 2.38.4-r1 apk
git-perl 2.38.4-r1 apk
gmp 6.2.1-r2 apk
gnupg 2.2.40-r0 apk
gnupg-dirmngr 2.2.40-r0 apk
gnupg-gpgconf 2.2.40-r0 apk
gnupg-utils 2.2.40-r0 apk
gnupg-wks-client 2.2.40-r0 apk
gnutls 3.7.8-r3 apk
google-api-core 2.11.0 python
google-api-python-client 2.86.0 python
google-auth 2.17.3 python
google-auth-httplib2 0.1.0 python
googleapis-common-protos 1.59.0 python
gpg 2.2.40-r0 apk
gpg-agent 2.2.40-r0 apk
gpg-wks-server 2.2.40-r0 apk
gpgsm 2.2.40-r0 apk
gpgv 2.2.40-r0 apk
httplib2 0.22.0 python
icu-data-en 72.1-r1 apk
icu-libs 72.1-r1 apk
idna 3.4 python
importlib-metadata 6.5.0 python
ip6tables 1.8.8-r2 apk
iptables 1.8.8-r2 apk
isodate 0.6.1 python
jmespath 1.0.1 python
josepy 1.13.0 python
jq 1.6-r2 apk
jsonlines 3.1.0 python
jsonpickle 3.0.1 python
libacl 2.3.1-r1 apk
libassuan 2.5.5-r1 apk
libattr 2.5.1-r2 apk
libavif 0.11.1-r0 apk
libbsd 0.11.7-r0 apk
libbz2 1.0.8-r4 apk
libc-utils 0.7.2-r3 apk
libcrypto3 3.0.8-r3 apk
libcurl 8.0.1-r0 apk
libdav1d 1.0.0-r2 apk
libedit 20221030.3.1-r0 apk
libevent 2.1.12-r5 apk
libexpat 2.5.0-r0 apk
libffi 3.4.4-r0 apk
libgcc 12.2.1_git20220924-r4 apk
libgcrypt 1.10.1-r0 apk
libgd 2.3.3-r3 apk
libgpg-error 1.46-r1 apk
libice 1.0.10-r1 apk
libidn 1.41-r0 apk
libintl 0.21.1-r1 apk
libjpeg-turbo 2.1.4-r0 apk
libksba 1.6.3-r0 apk
libldap 2.6.3-r6 apk
libmaxminddb-libs 1.7.1-r0 apk
libmcrypt 2.5.8-r10 apk
libmd 1.0.4-r0 apk
libmemcached-libs 1.0.18-r5 apk
libmnl 1.0.5-r0 apk
libnftnl 1.2.4-r0 apk
libpng 1.6.38-r0 apk
libpq 15.2-r0 apk
libproc 3.3.17-r2 apk
libsasl 2.1.28-r3 apk
libseccomp 2.5.4-r0 apk
libsm 1.2.3-r1 apk
libsodium 1.0.18-r2 apk
libssl3 3.0.8-r3 apk
libstdc++ 12.2.1_git20220924-r4 apk
libtasn1 4.19.0-r0 apk
libunistring 1.1-r0 apk
libuuid 2.38.1-r1 apk
libwebp 1.2.4-r1 apk
libx11 1.8.4-r0 apk
libxau 1.0.10-r0 apk
libxcb 1.15-r0 apk
libxdmcp 1.1.4-r0 apk
libxext 1.3.5-r0 apk
libxml2 2.10.4-r0 apk
libxpm 3.5.15-r0 apk
libxslt 1.1.37-r1 apk
libxt 1.2.1-r0 apk
libzip 1.9.2-r2 apk
linux-pam 1.5.2-r1 apk
logrotate 3.20.1-r3 apk
loopialib 0.2.0 python
lxml 4.9.2 python
lz4-libs 1.9.4-r1 apk
marshmallow 3.19.0 python
marshmallow-enum 1.5.1 python
memcached 1.6.17 binary
memcached 1.6.17-r0 apk
mock 5.0.2 python
mpdecimal 2.5.1-r1 apk
msal 1.22.0 python
msal-extensions 1.0.0 python
msrest 0.7.1 python
musl 1.2.3-r4 apk
musl-utils 1.2.3-r4 apk
mypy-extensions 1.0.0 python
nano 7.0-r0 apk
ncurses-libs 6.3_p20221119-r0 apk
ncurses-terminfo-base 6.3_p20221119-r0 apk
netcat-openbsd 1.130-r4 apk
nettle 3.8.1-r0 apk
nghttp2-libs 1.51.0-r0 apk
nginx 1.22.1-r0 apk
nginx-mod-devel-kit 1.22.1-r0 apk
nginx-mod-http-brotli 1.22.1-r0 apk
nginx-mod-http-dav-ext 1.22.1-r0 apk
nginx-mod-http-echo 1.22.1-r0 apk
nginx-mod-http-fancyindex 1.22.1-r0 apk
nginx-mod-http-geoip2 1.22.1-r0 apk
nginx-mod-http-headers-more 1.22.1-r0 apk
nginx-mod-http-image-filter 1.22.1-r0 apk
nginx-mod-http-perl 1.22.1-r0 apk
nginx-mod-http-redis2 1.22.1-r0 apk
nginx-mod-http-set-misc 1.22.1-r0 apk
nginx-mod-http-upload-progress 1.22.1-r0 apk
nginx-mod-http-xslt-filter 1.22.1-r0 apk
nginx-mod-mail 1.22.1-r0 apk
nginx-mod-rtmp 1.22.1-r0 apk
nginx-mod-stream 1.22.1-r0 apk
nginx-mod-stream-geoip2 1.22.1-r0 apk
nginx-vim 1.22.1-r0 apk
npth 1.6-r2 apk
oauth2client 4.1.3 python
oauthlib 3.2.2 python
oniguruma 6.9.8-r0 apk
openssl 3.0.8-r3 apk
p11-kit 0.24.1-r1 apk
packaging 23.1 python
parsedatetime 2.6 python
pcre 8.45-r2 apk
pcre2 10.42-r0 apk
perl 5.36.0-r0 apk
perl-error 0.17029-r1 apk
perl-git 2.38.4-r1 apk
php-cli 8.1.18 binary
php-fpm 8.1.18 binary
php81 8.1.18-r0 apk
php81-bcmath 8.1.18-r0 apk
php81-bz2 8.1.18-r0 apk
php81-common 8.1.18-r0 apk
php81-ctype 8.1.18-r0 apk
php81-curl 8.1.18-r0 apk
php81-dom 8.1.18-r0 apk
php81-exif 8.1.18-r0 apk
php81-fileinfo 8.1.18-r0 apk
php81-fpm 8.1.18-r0 apk
php81-ftp 8.1.18-r0 apk
php81-gd 8.1.18-r0 apk
php81-gmp 8.1.18-r0 apk
php81-iconv 8.1.18-r0 apk
php81-imap 8.1.18-r0 apk
php81-intl 8.1.18-r0 apk
php81-ldap 8.1.18-r0 apk
php81-mbstring 8.1.18-r0 apk
php81-mysqli 8.1.18-r0 apk
php81-mysqlnd 8.1.18-r0 apk
php81-opcache 8.1.18-r0 apk
php81-openssl 8.1.18-r0 apk
php81-pdo 8.1.18-r0 apk
php81-pdo_mysql 8.1.18-r0 apk
php81-pdo_odbc 8.1.18-r0 apk
php81-pdo_pgsql 8.1.18-r0 apk
php81-pdo_sqlite 8.1.18-r0 apk
php81-pear 8.1.18-r0 apk
php81-pecl-apcu 5.1.22-r0 apk
php81-pecl-igbinary 3.2.12-r0 apk
php81-pecl-mailparse 3.1.4-r0 apk
php81-pecl-mcrypt 1.0.6-r0 apk
php81-pecl-memcached 3.2.0-r0 apk
php81-pecl-redis 5.3.7-r0 apk
php81-pecl-xmlrpc 1.0.0_rc3-r0 apk
php81-pgsql 8.1.18-r0 apk
php81-phar 8.1.18-r0 apk
php81-posix 8.1.18-r0 apk
php81-session 8.1.18-r0 apk
php81-simplexml 8.1.18-r0 apk
php81-soap 8.1.18-r0 apk
php81-sockets 8.1.18-r0 apk
php81-sodium 8.1.18-r0 apk
php81-sqlite3 8.1.18-r0 apk
php81-tokenizer 8.1.18-r0 apk
php81-xml 8.1.18-r0 apk
php81-xmlreader 8.1.18-r0 apk
php81-xmlwriter 8.1.18-r0 apk
php81-xsl 8.1.18-r0 apk
php81-zip 8.1.18-r0 apk
pinentry 1.2.1-r0 apk
pip 23.1 python
pkb-client 1.2 python
popt 1.19-r0 apk
portalocker 2.7.0 python
procps 3.3.17-r2 apk
protobuf 4.22.3 python
publicsuffixlist 0.9.4 python
pyOpenSSL 23.1.1 python
pyRFC3339 1.1 python
pyacmedns 0.4 python
pyasn1 0.4.8 python
pyasn1-modules 0.2.8 python
pycparser 2.21 python
pyparsing 3.0.9 python
python 3.10.11 binary
python-dateutil 2.8.2 python
python-digitalocean 1.17.0 python
python-transip 0.6.0 python
python3 3.10.11-r0 apk
pytz 2023.3 python
readline 8.2.0-r0 apk
requests 2.28.2 python
requests-file 1.5.1 python
requests-mock 1.10.0 python
requests-oauthlib 1.3.1 python
rsa 4.9 python
s3transfer 0.6.0 python
scanelf 1.3.5-r1 apk
setuptools 65.5.0 python
shadow 4.13-r0 apk
six 1.16.0 python
skalibs 2.12.0.1-r0 apk
soupsieve 2.4.1 python
sqlite-libs 3.40.1-r0 apk
ssl_client 1.35.0-r29 apk
tiff 4.4.0-r3 apk
tldextract 3.4.0 python
typing-inspect 0.8.0 python
typing_extensions 4.5.0 python
tzdata 2023c-r0 apk
unixodbc 2.3.11-r0 apk
uritemplate 4.1.1 python
urllib3 1.26.15 python
utmps-libs 0.1.2.0-r1 apk
wheel 0.40.0 python
whois 5.5.14-r0 apk
xz 5.2.9-r0 apk
xz-libs 5.2.9-r0 apk
zipp 3.15.0 python
zlib 1.2.13-r0 apk
zope.interface 6.0 python
zstd-libs 1.5.5-r0 apk
NAME VERSION TYPE
Simple Launcher 1.1.0.14 dotnet (+5 duplicates)
acme 2.11.0 python
alpine-baselayout 3.6.5-r0 apk
alpine-baselayout-data 3.6.5-r0 apk
alpine-keys 2.4-r1 apk
alpine-release 3.20.2-r0 apk
aom-libs 3.9.1-r0 apk
apache2-utils 2.4.62-r0 apk
apk-tools 2.14.4-r0 apk
apr 1.7.4-r0 apk
apr-util 1.6.3-r1 apk
argon2-libs 20190702-r5 apk
attrs 24.2.0 python
autocommand 2.2.2 python
azure-common 1.1.28 python
azure-core 1.30.2 python
azure-identity 1.17.1 python
azure-mgmt-core 1.4.0 python
azure-mgmt-dns 8.1.0 python
backports-tarfile 1.2.0 python
bash 5.2.26-r0 apk
beautifulsoup4 4.12.3 python
boto3 1.35.5 python
botocore 1.35.5 python
brotli-libs 1.1.0-r2 apk
bs4 0.0.2 python
busybox 1.36.1-r29 apk
busybox-binsh 1.36.1-r29 apk
c-ares 1.28.1-r0 apk
c-client 2007f-r15 apk
ca-certificates 20240705-r0 apk
ca-certificates-bundle 20240705-r0 apk
cachetools 5.5.0 python
catatonit 0.2.0-r0 apk
certbot 2.11.0 python
certbot-dns-acmedns 0.1.0 python
certbot-dns-aliyun 2.0.0 python
certbot-dns-azure 2.5.0 python
certbot-dns-bunny 0.0.9 python
certbot-dns-cloudflare 2.11.0 python
certbot-dns-cpanel 0.4.0 python
certbot-dns-desec 1.2.1 python
certbot-dns-digitalocean 2.11.0 python
certbot-dns-directadmin 1.0.4 python
certbot-dns-dnsimple 2.11.0 python
certbot-dns-dnsmadeeasy 2.11.0 python
certbot-dns-dnspod 0.1.0 python
certbot-dns-do 0.31.0 python
certbot-dns-domeneshop 0.2.9 python
certbot-dns-dreamhost 1.0 python
certbot-dns-duckdns 1.3 python
certbot-dns-dynudns 0.0.6 python
certbot-dns-freedns 0.2.0 python
certbot-dns-gehirn 2.11.0 python
certbot-dns-glesys 2.1.0 python
certbot-dns-godaddy 2.8.0 python
certbot-dns-google 2.11.0 python
certbot-dns-he 1.0.0 python
certbot-dns-hetzner 2.0.1 python
certbot-dns-infomaniak 0.2.2 python
certbot-dns-inwx 2.2.0 python
certbot-dns-ionos 2024.1.8 python
certbot-dns-linode 2.11.0 python
certbot-dns-loopia 1.0.1 python
certbot-dns-luadns 2.11.0 python
certbot-dns-namecheap 1.0.0 python
certbot-dns-netcup 1.4.3 python
certbot-dns-njalla 1.0.0 python
certbot-dns-nsone 2.11.0 python
certbot-dns-ovh 2.11.0 python
certbot-dns-porkbun 0.8 python
certbot-dns-rfc2136 2.11.0 python
certbot-dns-route53 2.11.0 python
certbot-dns-sakuracloud 2.11.0 python
certbot-dns-standalone 1.1 python
certbot-dns-transip 0.5.2 python
certbot-dns-vultr 1.1.0 python
certbot-plugin-gandi 1.5.0 python
certifi 2024.7.4 python
cffi 1.17.0 python
charset-normalizer 3.3.2 python
cloudflare 2.19.4 python
composer 2.7.8 binary
configargparse 1.7 python
configobj 5.0.8 python
coreutils 9.5-r1 apk
coreutils-env 9.5-r1 apk
coreutils-fmt 9.5-r1 apk
coreutils-sha512sum 9.5-r1 apk
cryptography 43.0.0 python
curl 8.9.0-r0 apk
distro 1.9.0 python
dns-lexicon 3.18.0 python
dnslib 0.9.25 python
dnspython 2.6.1 python
domeneshop 0.4.4 python
fail2ban 1.1.0 python
fail2ban 1.1.0-r0 apk
fail2ban-pyc 1.1.0-r0 apk
filelock 3.15.4 python
findutils 4.9.0-r5 apk
fontconfig 2.15.0-r1 apk
freetype 2.13.2-r0 apk
future 1.0.0 python
gdbm 1.23-r1 apk
git 2.45.2-r0 apk
git-init-template 2.45.2-r0 apk
git-perl 2.45.2-r0 apk
gmp 6.3.0-r1 apk
gnupg 2.4.5-r0 apk
gnupg-dirmngr 2.4.5-r0 apk
gnupg-gpgconf 2.4.5-r0 apk
gnupg-keyboxd 2.4.5-r0 apk
gnupg-utils 2.4.5-r0 apk
gnupg-wks-client 2.4.5-r0 apk
gnutls 3.8.5-r0 apk
google-api-core 2.19.1 python
google-api-python-client 2.142.0 python
google-auth 2.34.0 python
google-auth-httplib2 0.2.0 python
googleapis-common-protos 1.63.2 python
gpg 2.4.5-r0 apk
gpg-agent 2.4.5-r0 apk
gpg-wks-server 2.4.5-r0 apk
gpgsm 2.4.5-r0 apk
gpgv 2.4.5-r0 apk
httplib2 0.22.0 python
icu-data-en 74.2-r0 apk
icu-libs 74.2-r0 apk
idna 3.8 python
importlib-metadata 8.0.0 python
importlib-resources 6.4.0 python
inflect 7.3.1 python
iptables 1.8.10-r3 apk
iptables-legacy 1.8.10-r3 apk
isodate 0.6.1 python
jaraco-context 5.3.0 python
jaraco-functools 4.0.1 python
jaraco-text 3.12.1 python
jmespath 1.0.1 python
josepy 1.14.0 python
jq 1.7.1-r0 apk
jsonlines 4.0.0 python
jsonpickle 3.2.2 python
libacl 2.3.2-r0 apk
libassuan 2.5.7-r0 apk
libattr 2.5.2-r0 apk
libavif 1.0.4-r0 apk
libbsd 0.12.2-r0 apk
libbz2 1.0.8-r6 apk
libcrypto3 3.3.1-r3 apk
libcurl 8.9.0-r0 apk
libdav1d 1.4.2-r0 apk
libedit 20240517.3.1-r0 apk
libevent 2.1.12-r7 apk
libexpat 2.6.2-r0 apk
libffi 3.4.6-r0 apk
libgcc 13.2.1_git20240309-r0 apk
libgcrypt 1.10.3-r0 apk
libgd 2.3.3-r9 apk
libgpg-error 1.49-r0 apk
libice 1.1.1-r6 apk
libidn2 2.3.7-r0 apk
libintl 0.22.5-r0 apk
libip4tc 1.8.10-r3 apk
libip6tc 1.8.10-r3 apk
libjpeg-turbo 3.0.3-r0 apk
libksba 1.6.6-r0 apk
libldap 2.6.7-r0 apk
libmaxminddb-libs 1.9.1-r0 apk
libmcrypt 2.5.8-r10 apk
libmd 1.1.0-r0 apk
libmemcached-libs 1.1.4-r1 apk
libmnl 1.0.5-r2 apk
libncursesw 6.4_p20240420-r0 apk
libnftnl 1.2.6-r0 apk
libpanelw 6.4_p20240420-r0 apk
libpng 1.6.43-r0 apk
libpq 16.3-r0 apk
libproc2 4.0.4-r0 apk
libpsl 0.21.5-r1 apk
libsasl 2.1.28-r6 apk
libseccomp 2.5.5-r1 apk
libsharpyuv 1.3.2-r0 apk
libsm 1.2.4-r4 apk
libsodium 1.0.19-r0 apk
libssl3 3.3.1-r3 apk
libstdc++ 13.2.1_git20240309-r0 apk
libtasn1 4.19.0-r2 apk
libunistring 1.2-r0 apk
libuuid 2.40.1-r1 apk
libwebp 1.3.2-r0 apk
libx11 1.8.9-r1 apk
libxau 1.0.11-r4 apk
libxcb 1.16.1-r0 apk
libxdmcp 1.1.5-r1 apk
libxext 1.3.6-r2 apk
libxml2 2.12.7-r0 apk
libxpm 3.5.17-r0 apk
libxslt 1.1.39-r1 apk
libxt 1.3.0-r5 apk
libxtables 1.8.10-r3 apk
libzip 1.10.1-r0 apk
linux-pam 1.6.0-r0 apk
logrotate 3.21.0-r1 apk
loopialib 0.2.0 python
lxml 5.3.0 python
lz4-libs 1.9.4-r5 apk
memcached 1.6.27-r0 apk
mock 5.1.0 python
more-itertools 10.3.0 python
mpdecimal 4.0.0-r0 apk
msal 1.30.0 python
msal-extensions 1.2.0 python
musl 1.2.5-r0 apk
musl-utils 1.2.5-r0 apk
my-test-package 1.0 python
nano 8.0-r0 apk
ncurses-terminfo-base 6.4_p20240420-r0 apk
netcat-openbsd 1.226-r0 apk
nettle 3.9.1-r0 apk
nghttp2-libs 1.62.1-r0 apk
nginx 1.26.2-r0 apk
nginx-mod-devel-kit 1.26.2-r0 apk
nginx-mod-http-brotli 1.26.2-r0 apk
nginx-mod-http-dav-ext 1.26.2-r0 apk
nginx-mod-http-echo 1.26.2-r0 apk
nginx-mod-http-fancyindex 1.26.2-r0 apk
nginx-mod-http-geoip2 1.26.2-r0 apk
nginx-mod-http-headers-more 1.26.2-r0 apk
nginx-mod-http-image-filter 1.26.2-r0 apk
nginx-mod-http-perl 1.26.2-r0 apk
nginx-mod-http-redis2 1.26.2-r0 apk
nginx-mod-http-set-misc 1.26.2-r0 apk
nginx-mod-http-upload-progress 1.26.2-r0 apk
nginx-mod-http-xslt-filter 1.26.2-r0 apk
nginx-mod-mail 1.26.2-r0 apk
nginx-mod-rtmp 1.26.2-r0 apk
nginx-mod-stream 1.26.2-r0 apk
nginx-mod-stream-geoip2 1.26.2-r0 apk
nginx-vim 1.26.2-r0 apk
npth 1.6-r4 apk
oniguruma 6.9.9-r0 apk
openssl 3.3.1-r3 apk
p11-kit 0.25.3-r0 apk
packaging 24.1 python
parsedatetime 2.6 python
pcre 8.45-r3 apk
pcre2 10.43-r0 apk
perl 5.38.2-r0 apk
perl-error 0.17029-r2 apk
perl-git 2.45.2-r0 apk
php83 8.3.10-r0 apk
php83-bcmath 8.3.10-r0 apk
php83-bz2 8.3.10-r0 apk
php83-common 8.3.10-r0 apk
php83-ctype 8.3.10-r0 apk
php83-curl 8.3.10-r0 apk
php83-dom 8.3.10-r0 apk
php83-exif 8.3.10-r0 apk
php83-fileinfo 8.3.10-r0 apk
php83-fpm 8.3.10-r0 apk
php83-ftp 8.3.10-r0 apk
php83-gd 8.3.10-r0 apk
php83-gmp 8.3.10-r0 apk
php83-iconv 8.3.10-r0 apk
php83-imap 8.3.10-r0 apk
php83-intl 8.3.10-r0 apk
php83-ldap 8.3.10-r0 apk
php83-mbstring 8.3.10-r0 apk
php83-mysqli 8.3.10-r0 apk
php83-mysqlnd 8.3.10-r0 apk
php83-opcache 8.3.10-r0 apk
php83-openssl 8.3.10-r0 apk
php83-pdo 8.3.10-r0 apk
php83-pdo_mysql 8.3.10-r0 apk
php83-pdo_odbc 8.3.10-r0 apk
php83-pdo_pgsql 8.3.10-r0 apk
php83-pdo_sqlite 8.3.10-r0 apk
php83-pear 8.3.10-r0 apk
php83-pecl-apcu 5.1.23-r0 apk
php83-pecl-igbinary 3.2.15-r0 apk
php83-pecl-mcrypt 1.0.7-r0 apk
php83-pecl-memcached 3.2.0-r0 apk
php83-pecl-msgpack 2.2.0-r2 apk
php83-pecl-redis 6.0.2-r0 apk
php83-pgsql 8.3.10-r0 apk
php83-phar 8.3.10-r0 apk
php83-posix 8.3.10-r0 apk
php83-session 8.3.10-r0 apk
php83-simplexml 8.3.10-r0 apk
php83-soap 8.3.10-r0 apk
php83-sockets 8.3.10-r0 apk
php83-sodium 8.3.10-r0 apk
php83-sqlite3 8.3.10-r0 apk
php83-tokenizer 8.3.10-r0 apk
php83-xml 8.3.10-r0 apk
php83-xmlreader 8.3.10-r0 apk
php83-xmlwriter 8.3.10-r0 apk
php83-xsl 8.3.10-r0 apk
php83-zip 8.3.10-r0 apk
pinentry 1.3.0-r0 apk
pip 24.2 python
pkb-client 1.2 python
platformdirs 4.2.2 python
popt 1.19-r3 apk
portalocker 2.10.1 python
procps-ng 4.0.4-r0 apk
proto-plus 1.24.0 python
protobuf 5.27.3 python
pyacmedns 0.4 python
pyasn1 0.6.0 python
pyasn1-modules 0.4.0 python
pyc 3.12.3-r2 apk
pycparser 2.22 python
pyjwt 2.9.0 python
pynamecheap 0.0.3 python
pyopenssl 24.2.1 python
pyotp 2.9.0 python
pyparsing 3.1.2 python
pyrfc3339 1.1 python
python-dateutil 2.9.0.post0 python
python-digitalocean 1.17.0 python
python-transip 0.6.0 python
python3 3.12.3-r2 apk
python3-pyc 3.12.3-r2 apk
python3-pycache-pyc0 3.12.3-r2 apk
pytz 2024.1 python
pyyaml 6.0.2 python
readline 8.2.10-r0 apk
requests 2.32.3 python
requests-file 2.1.0 python
requests-mock 1.12.1 python
rsa 4.9 python
s3transfer 0.10.2 python
scanelf 1.3.7-r2 apk
setuptools 73.0.1 python
shadow 4.15.1-r0 apk
six 1.16.0 python
skalibs 2.14.1.1-r0 apk
soupsieve 2.6 python
sqlite-libs 3.45.3-r1 apk
ssl_client 1.36.1-r29 apk
tiff 4.6.0t-r0 apk
tldextract 5.1.2 python
tomli 2.0.1 python
typeguard 4.3.0 python
typing-extensions 4.12.2 python (+1 duplicate)
tzdata 2024a-r1 apk
unixodbc 2.3.12-r0 apk
uritemplate 4.1.1 python
urllib3 2.2.2 python
utmps-libs 0.1.2.2-r1 apk
wheel 0.43.0 python
wheel 0.44.0 python
whois 5.5.23-r0 apk
xz-libs 5.6.2-r0 apk
zipp 3.19.2 python
zlib 1.3.1-r1 apk
zope-interface 7.0.1 python
zstd-libs 1.5.6-r0 apk

View File

@@ -7,41 +7,24 @@ project_logo: "https://github.com/linuxserver/docker-templates/raw/master/linuxs
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_blurb_optional_extras_enabled: false
project_blurb_optional_extras: []
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
# development version
development_versions: false
development_versions_items:
- { tag: "latest", desc: "Stable releases" }
# container parameters
common_param_env_vars_enabled: true #PGID, PUID, etc, you can set it to 'optional'
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_net: false #you can set it to 'optional'
param_net: "host"
param_net_desc: "Shares host networking with container."
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
- { env_var: "URL", env_value: "yourdomain.url", desc: "Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns)." }
- { env_var: "VALIDATION", env_value: "http", desc: "Certbot validation method to use, options are `http` or `dns` (`dns` method also requires `DNSPLUGIN` variable set)." }
- { env_var: "VALIDATION", env_value: "http", desc: "Certbot validation method to use, options are `http` or `dns` (`dns` method also requires `DNSPLUGIN` variable set).", env_options: ["http", "dns"] }
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "All the config files including the webroot reside here." }
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files" }
param_usage_include_ports: true
param_ports:
- { external_port: "443", internal_port: "443", port_desc: "Https port" }
param_device_map: false
param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
cap_add_param: true
cap_add_param_vars:
- { cap_add_var: "NET_ADMIN" }
@@ -51,27 +34,15 @@ 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` 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 `acmedns`, `aliyun`, `azure`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `duckdns`, `dynu`, `gandi`, `gehirn`, `godaddy`, `google`, `google-domains`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `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: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `acmedns`, `aliyun`, `azure`, `bunny`, `cloudflare`, `cpanel`, `desec`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `dnspod`, `do`, `domeneshop`, `dreamhost`, `duckdns`, `dynudns`, `freedns`, `gandi`, `gehirn`, `glesys`, `godaddy`, `google`, `he`, `hetzner`, `infomaniak`, `inwx`, `ionos`, `linode`, `loopia`, `luadns`, `namecheap`, `netcup`, `njalla`, `nsone`, `ovh`, `porkbun`, `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: "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." }
opt_param_usage_include_vols: false
opt_param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Configuration files." }
opt_param_usage_include_ports: true
opt_param_ports:
- { external_port: "80", internal_port: "80", port_desc: "Http port (required for http validation and http -> https redirect)" }
opt_param_device_map: false
opt_param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "For hardware transcoding" }
opt_cap_add_param: false
opt_cap_add_param_vars:
- { cap_add_var: "NET_ADMIN" }
optional_block_1: false
optional_block_1_items: ""
# application setup block
app_setup_block_enabled: true
@@ -84,13 +55,28 @@ app_setup_block: |
* For `dns` validation, make sure to enter your credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`
* Cloudflare provides free accounts for managing dns and is very easy to use with this image. Make sure that it is set up for "dns only" instead of "dns + proxy"
* Google dns plugin is meant to be used with "Google Cloud DNS", a paid enterprise product, and not for "Google Domains DNS"
* DuckDNS only supoprts two types of DNS validated certificates (not both at the same time):
* DuckDNS only supports two types of DNS validated certificates (not both at the same time):
1. Certs that only cover your main subdomain (ie. `yoursubdomain.duckdns.org`, leave the `SUBDOMAINS` variable empty)
2. Certs that cover sub-subdomains of your main subdomain (ie. `*.yoursubdomain.duckdns.org`, set the `SUBDOMAINS` variable to `wildcard`)
* `--cap-add=NET_ADMIN` is required for fail2ban to modify iptables
* After setup, navigate to `https://yourdomain.url` to access the default homepage (http access through port 80 is disabled by default, you can enable it by editing the default site config at `/config/nginx/site-confs/default.conf`).
* Certs are checked nightly and if expiration is within 30 days, renewal is attempted. If your cert is about to expire in less than 30 days, check the logs under `/config/log/letsencrypt` to see why the renewals have been failing. It is recommended to input your e-mail in docker parameters so you receive expiration notices from Let's Encrypt in those circumstances.
### Certbot Plugins
SWAG includes many Certbot plugins out of the box, but not all plugins can be included.
If you need a plugin that is not included, the quickest way to have the plugin available is to use our [Universal Package Install Docker Mod](https://github.com/linuxserver/docker-mods/tree/universal-package-install).
Set the following environment variables on your container:
```yaml
DOCKER_MODS=linuxserver/mods:universal-package-install
INSTALL_PIP_PACKAGES=certbot-dns-<plugin>
```
Set the required credentials (usually found in the plugin documentation) in `/config/dns-conf/<plugin>.ini`.
It is recommended to attempt obtaining a certificate with `STAGING=true` first to make sure the plugin is working as expected.
### Security and password protection
* The container detects changes to url and subdomains, revokes existing certs and generates new ones during start.
@@ -154,6 +140,25 @@ app_setup_block: |
# changelog
changelogs:
- { date: "24.07.14:", desc: "Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings."}
- { date: "01.07.24:", desc: "Fall back to iptables-legacy if iptables doesn't work." }
- { date: "23.03.24:", desc: "Fix perms on the generated `priv-fullchain-bundle.pem`." }
- { date: "14.03.24:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-location.conf, authelia-server.conf - Update Authelia conf samples with support for 4.38." }
- { date: "11.03.24:", desc: "Restore support for DynuDNS using `certbot-dns-dynudns`." }
- { date: "06.03.24:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Cleanup default site conf." }
- { date: "04.03.24:", desc: "Remove `stream.conf` inside the container to allow users to include their own block in `nginx.conf`." }
- { date: "23.01.24:", desc: "Rebase to Alpine 3.19 with php 8.3, add root periodic crontabs for logrotate." }
- { date: "01.01.24:", desc: "Add GleSYS DNS plugin." }
- { date: "11.12.23:", desc: "Deprecate certbot-dns-dynu to resolve dependency conflicts with other plugins." }
- { date: "30.11.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404." }
- { date: "23.11.23:", desc: "Run certbot as root to allow fix http validation." }
- { date: "01.10.23:", desc: "Fix \"unrecognized arguments\" issue in DirectAdmin DNS plugin." }
- { date: "28.08.23:", desc: "Add Namecheap DNS plugin." }
- { date: "12.08.23:", desc: "Add FreeDNS plugin. Detect certbot DNS authenticators using CLI." }
- { date: "07.08.23:", desc: "Add Bunny DNS Configuration." }
- { date: "27.07.23:", desc: "Added support for dreamhost validation." }
- { date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }
- { date: "27.04.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-location.conf, authelia-server.conf, authentik-location.conf, authentik-server.conf - Simplify auth configs and fix Set-Cookie header bug." }
- { date: "13.04.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, authelia-location.conf, authentik-location.conf, and site-confs/default.conf - Move ssl.conf include to default.conf. Remove Authorization headers in authelia. Sort proxy_set_header in authelia and authentik." }
- { date: "25.03.23:", desc: "Fix renewal post hook." }
- { date: "10.03.23:", desc: "Cleanup unused csr and keys folders. See [certbot 2.3.0 release notes](https://github.com/certbot/certbot/releases/tag/v2.3.0)." }

View File

@@ -0,0 +1,2 @@
# Bunny API token used by Certbot
dns_bunny_api_key = a65e8ebd-45ab-44d2-a542-40d4d009e3bf

View File

@@ -0,0 +1,4 @@
# Instructions: https://github.com/goncalo-leal/certbot-dns-dreamhost#usage
# Replace with your values
dns_dreamhost_baseurl = "https://api.dreamhost.com/"
dns_dreamhost_api_key = "<api_key>"

View File

@@ -0,0 +1,3 @@
# Instructions: https://github.com/DustyRah/certbot-dns-dynudns
# Replace with your API token from your dynudns account.
dns_dynu_auth_token = AbCbASsd!@34

View File

@@ -1,3 +0,0 @@
# Instructions: https://github.com/bikram990/certbot-dns-dynu#configuration
# Replace with your API token from your dynu account.
dns_dynu_auth_token = AbCbASsd!@34

View File

@@ -0,0 +1,4 @@
# Instructions: https://github.com/schleuss/certbot_dns_freedns#credentials
# Replace with your values
dns_freedns_username = myremoteuser
dns_freedns_password = verysecureremoteuserpassword

View File

@@ -0,0 +1,5 @@
# Instructions: https://github.com/runfalk/certbot-dns-glesys#usage
# GleSYS API credentials used by Certbot
dns_glesys_user = CL00000
dns_glesys_password = apikeygoeshere

View File

@@ -1,4 +0,0 @@
# Instructions: https://github.com/aaomidi/certbot-dns-google-domains#credentials
# Replace with your value
dns_google_domains_access_token = abcdef
dns_google_domains_zone = example.com

View File

@@ -0,0 +1,4 @@
# Instructions: https://github.com/knoxell/certbot-dns-namecheap#credentials
# Namecheap API credentials used by Certbot
dns_namecheap_username=my-username
dns_namecheap_api_key=my-api-key

View File

@@ -5,4 +5,5 @@ cd /config/keys/letsencrypt || exit 1
openssl pkcs12 -export -out privkey.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem -passout pass:
sleep 1
cat {privkey,fullchain}.pem >priv-fullchain-bundle.pem
chmod 600 priv-fullchain-bundle.pem
chown -R abc:abc /config/etc/letsencrypt

View File

@@ -12,4 +12,4 @@ datepattern = {^LN-BEG}
# DEV NOTES:
#
# Author: Will L (driz@linuxserver.io)
# Author: notdriz

View File

@@ -3,5 +3,3 @@
[Definition]
failregex = ^<HOST>.*"(GET|POST|HEAD).*" (401) .*$
ignoreregex = .*(?i)plex.*

View File

@@ -1,25 +1,32 @@
## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-location.conf.sample
## Version 2024/03/14 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-location.conf.sample
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
# Rename /config/nginx/proxy-confs/authelia.subdomain.conf.sample to /config/nginx/proxy-confs/authelia.subdomain.conf
# Make sure that the authelia configuration.yml has 'path: "authelia"' defined
# For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
# For authelia 4.38 and above, make sure that the authelia configuration.yml has 'address: "tcp://:9091/authelia"' defined
## Send a subrequest to Authelia to verify if the user is authenticated and has permission to access the resource.
auth_request /authelia/api/verify;
## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal.
## Send a subrequest to Authelia to verify if the user is authenticated and has permission to access the resource
## For authelia 4.37 and below, use the following line
# auth_request /authelia/api/verify;
## For authelia 4.38 and above, use the following line
auth_request /authelia/api/authz/auth-request;
## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal
error_page 401 = @authelia_proxy_signin;
## Translate response headers from Authelia into variables
## Translate the user information response headers from the auth subrequest into variables
auth_request_set $email $upstream_http_remote_email;
auth_request_set $groups $upstream_http_remote_groups;
auth_request_set $name $upstream_http_remote_name;
auth_request_set $user $upstream_http_remote_user;
## Inject the response header variables into the request made to the actual upstream
## Inject the user information into the request made to the actual upstream
proxy_set_header Remote-Email $email;
proxy_set_header Remote-Groups $groups;
proxy_set_header Remote-Name $name;
proxy_set_header Remote-User $user;
## Include the Set-Cookie header if present.
## Translate the Set-Cookie response header from the auth subrequest into a variable
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
## Translate the Location response header from the auth subrequest into a variable
auth_request_set $signin_url $upstream_http_location;

View File

@@ -1,27 +1,29 @@
## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample
## Version 2024/03/16 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
# Rename /config/nginx/proxy-confs/authelia.subdomain.conf.sample to /config/nginx/proxy-confs/authelia.subdomain.conf
# Make sure that the authelia configuration.yml has 'path: "authelia"' defined
# For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
# For authelia 4.38 and above, make sure that the authelia configuration.yml has 'address: "tcp://:9091/authelia"' defined
# location for authelia subfolder requests
location ^~ /authelia {
auth_request off; # requests to this subfolder must be accessible without authentication
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authelia authelia;
proxy_pass http://$upstream_authelia:9091;
}
# location for authelia auth requests
# location for authelia 4.37 and below auth requests
location = /authelia/api/verify {
internal;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authelia authelia;
proxy_pass http://$upstream_authelia:9091/authelia/api/verify;
proxy_pass http://$upstream_authelia:9091;
## Include the Set-Cookie header if present.
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
@@ -29,27 +31,42 @@ location = /authelia/api/verify {
proxy_set_header Content-Length "";
}
# Virtual location for authelia 401 redirects
location @authelia_proxy_signin {
# location for authelia 4.38 and above auth requests
location = /authelia/api/authz/auth-request {
internal;
## Set the $target_url variable based on the original request.
set_escape_uri $target_url $scheme://$http_host$request_uri;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authelia authelia;
proxy_pass http://$upstream_authelia:9091;
## Include the Set-Cookie header if present.
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
## Set $authelia_backend to route requests to the current domain by default
set $authelia_backend $http_host;
## In order for Webauthn to work with multiple domains authelia must operate on a separate subdomain
## To use authelia on a separate subdomain:
## * comment the $authelia_backend line above
## * rename /config/nginx/proxy-confs/authelia.conf.sample to /config/nginx/proxy-confs/authelia.conf
## * make sure that your dns has a cname set for authelia
## * uncomment the $authelia_backend line below and change example.com to your domain
## * restart the swag container
#set $authelia_backend authelia.example.com;
return 302 https://$authelia_backend/authelia/?rd=$target_url;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
}
# virtual location for authelia 401 redirects
location @authelia_proxy_signin {
internal;
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
## Set the $target_url variable based on the original request
set_escape_uri $target_url $scheme://$http_host$request_uri;
## Translate the Location response header from the auth subrequest into a variable
auth_request_set $signin_url $upstream_http_location;
if ($signin_url = '') {
## Set the $signin_url variable
set $signin_url https://$http_host/authelia/?rd=$target_url;
}
## Redirect to login
return 302 $signin_url;
}

View File

@@ -1,26 +1,26 @@
## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-location.conf.sample
## Version 2023/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-location.conf.sample
# Make sure that your authentik container is in the same user defined bridge network and is named authentik-server
# Rename /config/nginx/proxy-confs/authentik.subdomain.conf.sample to /config/nginx/proxy-confs/authentik.subdomain.conf
## Send a subrequest to Authentik to verify if the user is authenticated and has permission to access the resource.
## Send a subrequest to Authentik to verify if the user is authenticated and has permission to access the resource
auth_request /outpost.goauthentik.io/auth/nginx;
## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal.
## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal
error_page 401 = @goauthentik_proxy_signin;
## Translate response headers from Authentik into variables
## Translate the user information response headers from the auth subrequest into variables
auth_request_set $authentik_email $upstream_http_x_authentik_email;
auth_request_set $authentik_groups $upstream_http_x_authentik_groups;
auth_request_set $authentik_name $upstream_http_x_authentik_name;
auth_request_set $authentik_uid $upstream_http_x_authentik_uid;
auth_request_set $authentik_username $upstream_http_x_authentik_username;
## Inject the response header variables into the request made to the actual upstream
## Inject the user information into the request made to the actual upstream
proxy_set_header X-authentik-email $authentik_email;
proxy_set_header X-authentik-groups $authentik_groups;
proxy_set_header X-authentik-name $authentik_name;
proxy_set_header X-authentik-uid $authentik_uid;
proxy_set_header X-authentik-username $authentik_username;
## Include the Set-Cookie header if present.
## Translate the Set-Cookie response header from the auth subrequest into a variable
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;

View File

@@ -1,10 +1,11 @@
## Version 2023/02/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample
## Version 2023/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample
# Make sure that your authentik container is in the same user defined bridge network and is named authentik-server
# Rename /config/nginx/proxy-confs/authentik.subdomain.conf.sample to /config/nginx/proxy-confs/authentik.subdomain.conf
# location for authentik subfolder requests
location ^~ /outpost.goauthentik.io {
auth_request off; # requests to this subfolder must be accessible without authentication
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authentik authentik-server;
@@ -18,9 +19,9 @@ location = /outpost.goauthentik.io/auth/nginx {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_authentik authentik-server;
proxy_pass http://$upstream_authentik:9000/outpost.goauthentik.io/auth/nginx;
proxy_pass http://$upstream_authentik:9000;
## Include the Set-Cookie header if present.
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
@@ -28,18 +29,20 @@ location = /outpost.goauthentik.io/auth/nginx {
proxy_set_header Content-Length "";
}
# Virtual location for authentik 401 redirects
# virtual location for authentik 401 redirects
location @goauthentik_proxy_signin {
internal;
## Set the $target_url variable based on the original request.
set_escape_uri $target_url $scheme://$http_host$request_uri;
## Include the Set-Cookie header if present.
## Include the Set-Cookie header if present
auth_request_set $set_cookie $upstream_http_set_cookie;
add_header Set-Cookie $set_cookie;
## Set $authentik_backend to route requests to the current domain by default
set $authentik_backend $http_host;
return 302 https://$authentik_backend/outpost.goauthentik.io/start?rd=$target_url;
## Set the $target_url variable based on the original request
set_escape_uri $target_url $scheme://$http_host$request_uri;
## Set the $signin_url variable
set $signin_url https://$http_host/outpost.goauthentik.io/start?rd=$target_url;
## Redirect to login
return 302 $signin_url;
}

View File

@@ -1,4 +1,4 @@
## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
# redirect all traffic to https
server {
@@ -12,8 +12,8 @@ server {
# main server block
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
@@ -48,11 +48,25 @@ server {
# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;
try_files $uri $uri/ /index.html /index.php$is_args$args =404;
try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
}
location ~ ^(.+\.php)(.*)$ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;
# enable for Authentik (requires authentik-server.conf in the server block)
#include /config/nginx/authentik-location.conf;
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;

View File

View File

@@ -1,9 +1,8 @@
# do daily/weekly/monthly maintenance
# min hour day month weekday command
*/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
# renew letsencrypt certs
8 2 * * * /app/le-renew.sh >> /config/log/letsencrypt/letsencrypt.log 2>&1

View File

@@ -23,19 +23,52 @@ for i in "${SANED_VARS[@]}"; do
export echo "${i}"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')"
done
# Check for and install requested DNS plugins
if grep -q "universal-package-install" <<< "${DOCKER_MODS}" && grep -q "certbot-dns" <<< "${INSTALL_PIP_PACKAGES}"; then
echo "**** Installing requested dns plugins ****"
/etc/s6-overlay/s6-rc.d/init-mod-universal-package-install-add-package/run
/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
fi
# check to make sure DNSPLUGIN is selected if dns validation is used
if [[ "${VALIDATION}" = "dns" ]] && [[ ! "${DNSPLUGIN}" =~ ^(acmedns|aliyun|azure|cloudflare|cpanel|desec|digitalocean|directadmin|dnsimple|dnsmadeeasy|dnspod|do|domeneshop|duckdns|dynu|gandi|gehirn|godaddy|google|google-domains|he|hetzner|infomaniak|inwx|ionos|linode|loopia|luadns|netcup|njalla|nsone|ovh|porkbun|rfc2136|route53|sakuracloud|standalone|transip|vultr)$ ]]; then
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details."
CERTBOT_DNS_AUTHENTICATORS=$(certbot plugins --authenticators 2>/dev/null | sed -e 's/^Entry point: EntryPoint(name='\''cpanel'\''/Entry point: EntryPoint(name='\''dns-cpanel'\''/' -e '/EntryPoint(name='\''dns-/!d' -e 's/^Entry point: EntryPoint(name='\''dns-\([^ ]*\)'\'',/\1/' | sort)
if [[ "${VALIDATION}" = "dns" ]] && ! echo "${CERTBOT_DNS_AUTHENTICATORS}" | grep -q "${DNSPLUGIN}"; then
echo "Please set the DNSPLUGIN variable to one of the following:"
echo "${CERTBOT_DNS_AUTHENTICATORS}"
sleep infinity
fi
# set owner of certbot's CONFIG_DIR, WORK_DIR, and LOGS_DIR to abc
lsiown -R abc:abc \
/etc/letsencrypt \
/var/lib/letsencrypt \
/var/log/letsencrypt
# set_ini_value logic:
# - if the name is not found in the file, append the name=value to the end of the file
# - if the name is found in the file, replace the value
# - if the name is found in the file but commented out, uncomment the line and replace the value
# call set_ini_value with parameters: $1=name $2=value $3=file
function set_ini_value() {
name=${1//\//\\/}
value=${2//\//\\/}
sed -i \
-e '/^#\?\(\s*'"${name}"'\s*=\s*\).*/{s//\1'"${value}"'/;:a;n;ba;q}' \
-e '$a'"${name}"'='"${value}" "${3}"
}
# ensure config files exist and has at least one value set (set_ini_value does not work on empty files)
touch /config/etc/letsencrypt/cli.ini
lsiown abc:abc /config/etc/letsencrypt/cli.ini
grep -qF 'agree-tos' /config/etc/letsencrypt/cli.ini || echo 'agree-tos=true' >>/config/etc/letsencrypt/cli.ini
# copy dns default configs
cp -n /defaults/dns-conf/* /config/dns-conf/
cp -n /defaults/dns-conf/* /config/dns-conf/ 2> >(grep -v 'cp: not replacing')
lsiown -R abc:abc /config/dns-conf
# copy default renewal hooks
chmod -R +x /defaults/etc/letsencrypt/renewal-hooks
cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/
cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/ 2> >(grep -v 'cp: not replacing')
lsiown -R abc:abc /config/etc/letsencrypt/renewal-hooks
# replace nginx service location in renewal hooks
@@ -157,21 +190,25 @@ if [[ ! "${URL}" = "${ORIGURL}" ]] ||
[[ ! "${CERTPROVIDER}" = "${ORIGCERTPROVIDER}" ]]; then
echo "Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created"
if [[ "${ORIGCERTPROVIDER}" = "zerossl" ]] && [[ -n "${ORIGEMAIL}" ]]; then
REV_EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=${ORIGEMAIL}")
REV_ZEROSSL_EAB_KID=$(echo "${REV_EAB_CREDS}" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
REV_ZEROSSL_EAB_HMAC_KEY=$(echo "${REV_EAB_CREDS}" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
REV_ACMESERVER=("https://acme.zerossl.com/v2/DV90")
REV_ZEROSSL_EAB_KID=$(awk -F "=" '/eab-kid/ {print $2}' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf" | tr -d ' ')
REV_ZEROSSL_EAB_HMAC_KEY=$(awk -F "=" '/eab-hmac-key/ {print $2}' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf" | tr -d ' ')
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
REV_ZEROSSL_EAB_KID=$(awk -F "=" '/eab-kid/ {print $2}' /config/etc/letsencrypt/cli.ini | tr -d ' ')
REV_ZEROSSL_EAB_HMAC_KEY=$(awk -F "=" '/eab-hmac-key/ {print $2}' /config/etc/letsencrypt/cli.ini | tr -d ' ')
fi
if [[ -n "${REV_ZEROSSL_EAB_KID}" ]] && [[ -n "${REV_ZEROSSL_EAB_HMAC_KEY}" ]]; then
REV_ACMESERVER+=("--eab-kid" "${REV_ZEROSSL_EAB_KID}" "--eab-hmac-key" "${REV_ZEROSSL_EAB_HMAC_KEY}")
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"
REV_ACMESERVER=("https://acme-staging-v02.api.letsencrypt.org/directory")
else
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
REV_ACMESERVER=("https://acme-v02.api.letsencrypt.org/directory")
fi
if [[ -f /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem ]]; then
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --server ${REV_ACMESERVER} || true
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --server "${REV_ACMESERVER[@]}" || true
else
certbot revoke --non-interactive --cert-name "${ORIGDOMAIN}" --server "${REV_ACMESERVER[@]}" || true
fi
rm -rf /config/etc/letsencrypt/{accounts,archive,live,renewal}
fi
@@ -182,9 +219,11 @@ echo -e "ORIGURL=\"${URL}\" ORIGSUBDOMAINS=\"${SUBDOMAINS}\" ORIGONLY_SUBDOMAINS
# Check if the cert is using the old LE root cert, revoke and regen if necessary
if [[ -f "/config/keys/letsencrypt/chain.pem" ]] && { [[ "${CERTPROVIDER}" == "letsencrypt" ]] || [[ "${CERTPROVIDER}" == "" ]]; } && [[ "${STAGING}" != "true" ]] && ! openssl x509 -in /config/keys/letsencrypt/chain.pem -noout -issuer | grep -q "ISRG Root X"; then
echo "The cert seems to be using the old LE root cert, which is no longer valid. Deleting and revoking."
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
REV_ACMESERVER=("https://acme-v02.api.letsencrypt.org/directory")
if [[ -f /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem ]]; then
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --server ${REV_ACMESERVER} || true
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --server "${REV_ACMESERVER[@]}" || true
else
certbot revoke --non-interactive --cert-name "${ORIGDOMAIN}" --server "${REV_ACMESERVER[@]}" || true
fi
rm -rf /config/etc/letsencrypt/{accounts,archive,live,renewal}
fi
@@ -208,52 +247,51 @@ else
ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
fi
# figuring out url only vs url & subdomains vs subdomains only
set_ini_value "server" "${ACMESERVER}" /config/etc/letsencrypt/cli.ini
# figuring out domain only vs domain & subdomains vs subdomains only
DOMAINS_ARRAY=()
if [[ -z "${SUBDOMAINS}" ]] || [[ "${ONLY_SUBDOMAINS}" != true ]]; then
DOMAINS_ARRAY+=("${URL}")
fi
if [[ -n "${SUBDOMAINS}" ]]; then
echo "SUBDOMAINS entered, processing"
SUBDOMAINS_ARRAY=()
if [[ "${SUBDOMAINS}" = "wildcard" ]]; then
if [[ "${ONLY_SUBDOMAINS}" = true ]]; then
export URL_REAL="-d *.${URL}"
echo "Wildcard cert for only the subdomains of ${URL} will be requested"
else
export URL_REAL="-d *.${URL} -d ${URL}"
echo "Wildcard cert for ${URL} will be requested"
fi
SUBDOMAINS_ARRAY+=("*.${URL}")
echo "Wildcard cert for ${URL} will be requested"
else
echo "SUBDOMAINS entered, processing"
for job in $(echo "${SUBDOMAINS}" | tr "," " "); do
export SUBDOMAINS_REAL="${SUBDOMAINS_REAL} -d ${job}.${URL}"
SUBDOMAINS_ARRAY+=("${job}.${URL}")
done
if [[ "${ONLY_SUBDOMAINS}" = true ]]; then
URL_REAL="${SUBDOMAINS_REAL}"
echo "Only subdomains, no URL in cert"
else
URL_REAL="-d ${URL}${SUBDOMAINS_REAL}"
fi
echo "Sub-domains processed are: ${SUBDOMAINS_REAL}"
echo "Sub-domains processed are: $(echo "${SUBDOMAINS_ARRAY[*]}" | tr " " ",")"
fi
else
echo "No subdomains defined"
URL_REAL="-d ${URL}"
DOMAINS_ARRAY+=("${SUBDOMAINS_ARRAY[@]}")
fi
# add extra domains
if [[ -n "${EXTRA_DOMAINS}" ]]; then
echo "EXTRA_DOMAINS entered, processing"
EXTRA_DOMAINS_ARRAY=()
for job in $(echo "${EXTRA_DOMAINS}" | tr "," " "); do
export EXTRA_DOMAINS_REAL="${EXTRA_DOMAINS_REAL} -d ${job}"
EXTRA_DOMAINS_ARRAY+=("${job}")
done
echo "Extra domains processed are: ${EXTRA_DOMAINS_REAL}"
URL_REAL="${URL_REAL} ${EXTRA_DOMAINS_REAL}"
echo "Extra domains processed are: $(echo "${EXTRA_DOMAINS_ARRAY[*]}" | tr " " ",")"
DOMAINS_ARRAY+=("${EXTRA_DOMAINS_ARRAY[@]}")
fi
# setting domains in cli.ini
set_ini_value "domains" "$(echo "${DOMAINS_ARRAY[*]}" | tr " " ",")" /config/etc/letsencrypt/cli.ini
# figuring out whether to use e-mail and which
if [[ ${EMAIL} == *@* ]]; then
echo "E-mail address entered: ${EMAIL}"
EMAILPARAM="-m ${EMAIL} --no-eff-email"
set_ini_value "email" "${EMAIL}" /config/etc/letsencrypt/cli.ini
set_ini_value "no-eff-email" "true" /config/etc/letsencrypt/cli.ini
set_ini_value "register-unsafely-without-email" "false" /config/etc/letsencrypt/cli.ini
else
echo "No e-mail address entered or address invalid"
EMAILPARAM="--register-unsafely-without-email"
set_ini_value "register-unsafely-without-email" "true" /config/etc/letsencrypt/cli.ini
fi
# alter extension for error message
@@ -265,37 +303,41 @@ fi
# setting the validation method to use
if [[ "${VALIDATION}" = "dns" ]]; then
AUTHENTICATORPARAM="--authenticator dns-${DNSPLUGIN}"
DNSCREDENTIALSPARAM="--dns-${DNSPLUGIN}-credentials ${DNSCREDENTIALFILE}"
if [[ -n "${PROPAGATION}" ]]; then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
set_ini_value "preferred-challenges" "dns" /config/etc/letsencrypt/cli.ini
set_ini_value "authenticator" "dns-${DNSPLUGIN}" /config/etc/letsencrypt/cli.ini
set_ini_value "dns-${DNSPLUGIN}-credentials" "${DNSCREDENTIALFILE}" /config/etc/letsencrypt/cli.ini
if [[ -n "${PROPAGATION}" ]]; then set_ini_value "dns-${DNSPLUGIN}-propagation-seconds" "${PROPAGATION}" /config/etc/letsencrypt/cli.ini; fi
# plugins that don't support setting credentials file
if [[ "${DNSPLUGIN}" =~ ^(route53|standalone)$ ]]; then
DNSCREDENTIALSPARAM=""
sed -i "/^dns-${DNSPLUGIN}-credentials\b/d" /config/etc/letsencrypt/cli.ini
fi
# plugins that don't support setting propagation
if [[ "${DNSPLUGIN}" =~ ^(azure|gandi|route53|standalone)$ ]]; then
if [[ -n "${PROPAGATION}" ]]; then echo "${DNSPLUGIN} dns plugin does not support setting propagation time"; fi
PROPAGATIONPARAM=""
sed -i "/^dns-${DNSPLUGIN}-propagation-seconds\b/d" /config/etc/letsencrypt/cli.ini
fi
# plugins that use old parameter naming convention
if [[ "${DNSPLUGIN}" =~ ^(cpanel)$ ]]; then
AUTHENTICATORPARAM="--authenticator ${DNSPLUGIN}"
DNSCREDENTIALSPARAM="--${DNSPLUGIN}-credentials ${DNSCREDENTIALFILE}"
if [[ -n "${PROPAGATION}" ]]; then PROPAGATIONPARAM="--${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
sed -i "/^dns-${DNSPLUGIN}-credentials\b/d" /config/etc/letsencrypt/cli.ini
sed -i "/^dns-${DNSPLUGIN}-propagation-seconds\b/d" /config/etc/letsencrypt/cli.ini
set_ini_value "authenticator" "${DNSPLUGIN}" /config/etc/letsencrypt/cli.ini
set_ini_value "${DNSPLUGIN}-credentials" "${DNSCREDENTIALFILE}" /config/etc/letsencrypt/cli.ini
if [[ -n "${PROPAGATION}" ]]; then set_ini_value "${DNSPLUGIN}-propagation-seconds" "${PROPAGATION}" /config/etc/letsencrypt/cli.ini; fi
fi
# don't restore txt records when using DuckDNS plugin
if [[ "${DNSPLUGIN}" =~ ^(duckdns)$ ]]; then
AUTHENTICATORPARAM="${AUTHENTICATORPARAM} --dns-${DNSPLUGIN}-no-txt-restore"
set_ini_value "dns-${DNSPLUGIN}-no-txt-restore" "true" /config/etc/letsencrypt/cli.ini
fi
PREFCHAL="${AUTHENTICATORPARAM} ${DNSCREDENTIALSPARAM} ${PROPAGATIONPARAM}"
echo "${VALIDATION} validation via ${DNSPLUGIN} plugin is selected"
elif [[ "${VALIDATION}" = "tls-sni" ]]; then
PREFCHAL="--standalone --preferred-challenges http"
set_ini_value "preferred-challenges" "http" /config/etc/letsencrypt/cli.ini
set_ini_value "authenticator" "standalone" /config/etc/letsencrypt/cli.ini
echo "*****tls-sni validation has been deprecated, attempting http validation instead"
else
PREFCHAL="--standalone --preferred-challenges http"
set_ini_value "preferred-challenges" "http" /config/etc/letsencrypt/cli.ini
set_ini_value "authenticator" "standalone" /config/etc/letsencrypt/cli.ini
echo "http validation is selected"
fi
@@ -304,17 +346,17 @@ if [[ ! -f "/config/keys/letsencrypt/fullchain.pem" ]]; then
if [[ "${CERTPROVIDER}" = "zerossl" ]] && [[ -n "${EMAIL}" ]]; then
echo "Retrieving EAB from ZeroSSL"
EAB_CREDS=$(curl -s https://api.zerossl.com/acme/eab-credentials-email --data "email=${EMAIL}")
ZEROSSL_EAB_KID=$(echo "${EAB_CREDS}" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_kid'])")
ZEROSSL_EAB_HMAC_KEY=$(echo "${EAB_CREDS}" | python3 -c "import sys, json; print(json.load(sys.stdin)['eab_hmac_key'])")
ZEROSSL_EAB_KID=$(echo "${EAB_CREDS}" | jq .eab_kid)
ZEROSSL_EAB_HMAC_KEY=$(echo "${EAB_CREDS}" | jq .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}"
set_ini_value "eab-kid" "${ZEROSSL_EAB_KID}" /config/etc/letsencrypt/cli.ini
set_ini_value "eab-hmac-key" "${ZEROSSL_EAB_HMAC_KEY}" /config/etc/letsencrypt/cli.ini
fi
echo "Generating new certificate"
# shellcheck disable=SC2086
certbot certonly --non-interactive --renew-by-default --server ${ACMESERVER} ${ZEROSSL_EAB} ${PREFCHAL} --rsa-key-size 4096 ${EMAILPARAM} --agree-tos ${URL_REAL}
certbot certonly --non-interactive --renew-by-default
if [[ ! -d /config/keys/letsencrypt ]]; then
if [[ "${VALIDATION}" = "dns" ]]; then
echo "ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the ${DNSCREDENTIALFILE} file."

View File

@@ -1,38 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# make folders
mkdir -p \
/config/crontabs
## root
# if crontabs do not exist in config
if [[ ! -f /config/crontabs/root ]]; then
# copy crontab from system
if crontab -l -u root; then
crontab -l -u root >/config/crontabs/root
fi
# if crontabs still do not exist in config (were not copied from system)
# copy crontab from included defaults (using -n, do not overwrite an existing file)
cp -n /etc/crontabs/root /config/crontabs/
fi
# set permissions and import user crontabs
lsiown root:root /config/crontabs/root
crontab -u root /config/crontabs/root
## abc
# if crontabs do not exist in config
if [[ ! -f /config/crontabs/abc ]]; then
# copy crontab from system
if crontab -l -u abc; then
crontab -l -u abc >/config/crontabs/abc
fi
# if crontabs still do not exist in config (were not copied from system)
# copy crontab from included defaults (using -n, do not overwrite an existing file)
cp -n /etc/crontabs/abc /config/crontabs/
fi
# set permissions and import user crontabs
lsiown abc:abc /config/crontabs/abc
crontab -u abc /config/crontabs/abc

View File

@@ -1 +0,0 @@
oneshot

View File

@@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/init-crontabs-config/run

View File

@@ -1,6 +1,15 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if ! iptables -L &> /dev/null; then
ln -sf /sbin/xtables-legacy-multi /sbin/iptables
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-save
ln -sf /sbin/xtables-legacy-multi /sbin/iptables-restore
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-save
ln -sf /sbin/xtables-legacy-multi /sbin/ip6tables-restore
fi
# copy/update the fail2ban config defaults to/in /config
cp -R /defaults/fail2ban/filter.d /config/fail2ban/
cp -R /defaults/fail2ban/action.d /config/fail2ban/

View File

@@ -3,7 +3,7 @@
# make our folders and links
mkdir -p \
/config/{fail2ban,crontabs,dns-conf} \
/config/{fail2ban,dns-conf} \
/config/etc/letsencrypt/renewal-hooks \
/config/log/{fail2ban,letsencrypt,nginx} \
/config/nginx/proxy-confs \

View File

@@ -9,5 +9,5 @@ if [[ -d /defaults/nginx/proxy-confs/ ]]; then
-maxdepth 1 \
-name "*.conf.sample" \
-type f \
-exec cp "{}" /config/nginx/proxy-confs/ +
-exec cp "{}" /config/nginx/proxy-confs/ \;
fi