Skip to content

Commit 612f26a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into netbox
2 parents 8819cd9 + 99eedad commit 612f26a

22 files changed

Lines changed: 657 additions & 43 deletions

.github/workflows/check_samples.yml

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,58 @@ name: Check Samples
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
check-allowed-file-names:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

16-
- name: Check Allowed File Names
17-
run: |
18-
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.conf.sample' -o -name 'README.md' -o -name 'LICENSE' \))
19-
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
20-
if (( NOT_SAMPLES_COUNT > 0 )); then
21-
echo "The following files have extensions that are not allowed:"
22-
echo "${NOT_SAMPLES}"
23-
exit 1
24-
fi
16+
- name: Check Allowed File Names
17+
run: |
18+
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.conf.sample' -o -name 'README.md' -o -name 'LICENSE' \))
19+
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
20+
if (( NOT_SAMPLES_COUNT > 0 )); then
21+
for i in ${NOT_SAMPLES}; do
22+
echo "::error file=${i},line=1,title=Disallowed filenames::This file extension is not allowed, only .sample is allowed"
23+
done
24+
exit 1
25+
fi
2526
26-
- name: Check Executable Bit
27-
run: |
28-
EXECUTABLE_BIT=$(find . -not -path '*/\.*' -type f -executable)
29-
EXECUTABLE_BIT_COUNT=$(echo "${EXECUTABLE_BIT}" | wc -w)
30-
if (( EXECUTABLE_BIT_COUNT > 0 )); then
31-
echo "The following files have executable permissions (not allowed):"
32-
echo "${EXECUTABLE_BIT}"
33-
exit 1
34-
fi
27+
- name: Check Executable Bit
28+
run: |
29+
EXECUTABLE_BIT=$(find . -not -path '*/\.*' -type f -executable)
30+
EXECUTABLE_BIT_COUNT=$(echo "${EXECUTABLE_BIT}" | wc -w)
31+
if (( EXECUTABLE_BIT_COUNT > 0 )); then
32+
for i in ${EXECUTABLE_BIT}; do
33+
echo "::error file=${i},line=1,title=Executable Bit::This file is set as exectutable, which is not allowed"
34+
done
35+
exit 1
36+
fi
3537
36-
- name: Check Line Endings
37-
run: |
38-
CRLF_ENDINGS=$(find . -not -path '*/\.*' -type f -exec file "{}" ";" | grep CRLF || true)
39-
CRLF_ENDINGS_COUNT=$(echo "${CRLF_ENDINGS}" | wc -w)
40-
if (( CRLF_ENDINGS_COUNT > 0 )); then
41-
echo "The following files have CRLF line endings (not allowed):"
42-
echo "${CRLF_ENDINGS}"
43-
exit 1
44-
fi
38+
- name: Check Line Endings
39+
run: |
40+
CRLF_ENDINGS=$(find . -not -path '*/\.*' -type f -exec file "{}" ";" | grep CRLF || true)
41+
CRLF_ENDINGS_COUNT=$(echo "${CRLF_ENDINGS}" | wc -w)
42+
if (( CRLF_ENDINGS_COUNT > 0 )); then
43+
for i in ${CRLF_ENDINGS}; do
44+
echo "::error file=${i},line=1,title=Line Endings::This file has CRLF (Windows) line endings, which is not allowed"
45+
done
46+
exit 1
47+
fi
4548
46-
- name: Check Version Date Line Exists
47-
run: |
48-
# Date regex based on https://www.html5pattern.com/Dates
49-
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version (?:19|20|21)[0-9]{2}/(?:(?:0[1-9]|1[0-2])/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])/(?:30))|(?:(?:0[13578]|1[02])/31))$' {} \; | grep 0$ | cut -d':' -f1)
50-
VERSION_LINE_MISSING_COUNT=$(echo "${VERSION_LINE_MISSING}" | wc -w)
51-
if (( VERSION_LINE_MISSING_COUNT > 0 )); then
52-
echo "The following files are missing the version date line or it is not formatted correctly (YYYY/MM/DD):"
53-
echo "${VERSION_LINE_MISSING}"
54-
exit 1
55-
fi
49+
- name: Check Version Date Line Exists
50+
run: |
51+
# Date regex based on https://www.html5pattern.com/Dates
52+
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version (?:19|20|21)[0-9]{2}/(?:(?:0[1-9]|1[0-2])/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])/(?:30))|(?:(?:0[13578]|1[02])/31))$' {} \; | grep 0$ | cut -d':' -f1)
53+
VERSION_LINE_MISSING_COUNT=$(echo "${VERSION_LINE_MISSING}" | wc -w)
54+
if (( VERSION_LINE_MISSING_COUNT > 0 )); then
55+
for i in ${VERSION_LINE_MISSING}; do
56+
echo "::error file=${i},line=1,title=Version Line::This file is missing the version date line or it is not formatted correctly (YYYY/MM/DD)"
57+
done
58+
exit 1
59+
fi
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Version 2021/05/18
2+
# make sure that your dns has a cname set for audiobookshelf and that your audiobookshelf container is not using a base url
3+
4+
server {
5+
listen 443 ssl;
6+
listen [::]:443 ssl;
7+
8+
server_name audiobookshelf.*;
9+
10+
include /config/nginx/ssl.conf;
11+
12+
client_max_body_size 0;
13+
14+
# enable for ldap auth, fill in ldap details in ldap.conf
15+
#include /config/nginx/ldap.conf;
16+
17+
# enable for Authelia
18+
#include /config/nginx/authelia-server.conf;
19+
20+
location / {
21+
# enable the next two lines for http auth
22+
#auth_basic "Restricted";
23+
#auth_basic_user_file /config/nginx/.htpasswd;
24+
25+
# enable the next two lines for ldap auth
26+
#auth_request /auth;
27+
#error_page 401 =200 /ldaplogin;
28+
29+
# enable for Authelia
30+
#include /config/nginx/authelia-location.conf;
31+
32+
include /config/nginx/proxy.conf;
33+
include /config/nginx/resolver.conf;
34+
set $upstream_app audiobookshelf;
35+
set $upstream_port 80;
36+
set $upstream_proto http;
37+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+
}
40+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Version 2021/05/18
2+
# set the CONTEXT_PATH variable to /audiobookshelf in audiobookshelf container.
3+
4+
location ^~ /audiobookshelf {
5+
# enable the next two lines for http auth
6+
#auth_basic "Restricted";
7+
#auth_basic_user_file /config/nginx/.htpasswd;
8+
9+
# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
10+
#auth_request /auth;
11+
#error_page 401 =200 /ldaplogin;
12+
13+
# enable for Authelia, also enable authelia-server.conf in the default site config
14+
#include /config/nginx/authelia-location.conf;
15+
16+
include /config/nginx/proxy.conf;
17+
include /config/nginx/resolver.conf;
18+
set $upstream_app audiobookshelf;
19+
set $upstream_port 80;
20+
set $upstream_proto http;
21+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
22+
23+
}

babybuddy.subdomain.conf.sample

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Version 2022/05/10
2+
# make sure that your dns has a cname set for babybuddy
3+
4+
server {
5+
listen 443 ssl;
6+
listen [::]:443 ssl;
7+
8+
server_name babybuddy.*;
9+
10+
include /config/nginx/ssl.conf;
11+
12+
client_max_body_size 0;
13+
14+
# enable for ldap auth, fill in ldap details in ldap.conf
15+
#include /config/nginx/ldap.conf;
16+
17+
# enable for Authelia
18+
#include /config/nginx/authelia-server.conf;
19+
20+
location / {
21+
# enable the next two lines for http auth
22+
#auth_basic "Restricted";
23+
#auth_basic_user_file /config/nginx/.htpasswd;
24+
25+
# enable the next two lines for ldap auth
26+
#auth_request /auth;
27+
#error_page 401 =200 /ldaplogin;
28+
29+
# enable for Authelia
30+
#include /config/nginx/authelia-location.conf;
31+
32+
include /config/nginx/proxy.conf;
33+
include /config/nginx/resolver.conf;
34+
set $upstream_app babybuddy;
35+
set $upstream_port 8000;
36+
set $upstream_proto http;
37+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+
}
40+
}

bitwarden.subfolder.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ location ~ (/bitwarden)?/admin {
4040

4141
include /config/nginx/proxy.conf;
4242
include /config/nginx/resolver.conf;
43-
set $upstream_app vaultwarden;
43+
set $upstream_app bitwarden;
4444
set $upstream_port 80;
4545
set $upstream_proto http;
4646
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

calibre.subdomain.conf.sample

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
## Version 2021/05/18
1+
## Version 2022/03/29
22
# make sure that your dns has a cname set for calibre
3+
# for the content server, go into calibre preferences / sharing over the net / advanced and
4+
# set the first option for prefix url to '/content-server', save and restart the container
5+
# the content server will be accessible at 'https://calibre.domain.com/content-server/'
36

47
server {
58
listen 443 ssl;
@@ -38,4 +41,28 @@ server {
3841

3942
proxy_buffering off;
4043
}
44+
45+
location /content-server {
46+
return 301 $scheme://$host/content-server/;
47+
}
48+
49+
location ^~ /content-server/ {
50+
# enable the next two lines for http auth
51+
#auth_basic "Restricted";
52+
#auth_basic_user_file /config/nginx/.htpasswd;
53+
54+
# enable the next two lines for ldap auth
55+
#auth_request /auth;
56+
#error_page 401 =200 /ldaplogin;
57+
58+
# enable for Authelia
59+
#include /config/nginx/authelia-location.conf;
60+
61+
include /config/nginx/proxy.conf;
62+
include /config/nginx/resolver.conf;
63+
set $upstream_app calibre;
64+
set $upstream_port 8081;
65+
set $upstream_proto http;
66+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
67+
}
4168
}

calibre.subfolder.conf.sample

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
## Version 2021/06/28
1+
## Version 2022/03/29
22
# In calibre docker arguments, set an env variable for SUBFOLDER=/calibre/
3+
# for the content server, go into calibre preferences / sharing over the net / advanced and
4+
# set the first option for prefix url to '/content-server', save and restart the container
5+
# the content server will be accessible at 'https://domain.com/content-server/'
36

47
location /calibre {
58
return 301 $scheme://$host/calibre/;
@@ -25,3 +28,28 @@ location ^~ /calibre/ {
2528
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
2629

2730
}
31+
32+
location /content-server {
33+
return 301 $scheme://$host/content-server/;
34+
}
35+
36+
location ^~ /content-server/ {
37+
# enable the next two lines for http auth
38+
#auth_basic "Restricted";
39+
#auth_basic_user_file /config/nginx/.htpasswd;
40+
41+
# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
42+
#auth_request /auth;
43+
#error_page 401 =200 /ldaplogin;
44+
45+
# enable for Authelia, also enable authelia-server.conf in the default site config
46+
#include /config/nginx/authelia-location.conf;
47+
48+
include /config/nginx/proxy.conf;
49+
include /config/nginx/resolver.conf;
50+
set $upstream_app calibre;
51+
set $upstream_port 8081;
52+
set $upstream_proto http;
53+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
54+
55+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Version 2022/06/25
2+
# make sure that your dns has a cname set for changedetection and that your changedetection container is named changedetection
3+
4+
server {
5+
listen 443 ssl;
6+
listen [::]:443 ssl;
7+
8+
server_name changedetection.*;
9+
10+
include /config/nginx/ssl.conf;
11+
12+
client_max_body_size 0;
13+
14+
# enable for ldap auth, fill in ldap details in ldap.conf
15+
#include /config/nginx/ldap.conf;
16+
17+
# enable for Authelia
18+
#include /config/nginx/authelia-server.conf;
19+
20+
location / {
21+
# enable the next two lines for http auth
22+
#auth_basic "Restricted";
23+
#auth_basic_user_file /config/nginx/.htpasswd;
24+
25+
# enable the next two lines for ldap auth
26+
#auth_request /auth;
27+
#error_page 401 =200 /ldaplogin;
28+
29+
# enable for Authelia
30+
#include /config/nginx/authelia-location.conf;
31+
32+
include /config/nginx/proxy.conf;
33+
include /config/nginx/resolver.conf;
34+
set $upstream_app changedetection;
35+
set $upstream_port 5000;
36+
set $upstream_proto http;
37+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+
}
40+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Version 2022/05/24
2+
# make sure that your dns has a cname set for crowdsec-dashboard and that your crowdsec-dashboard container is not using a base url
3+
4+
server {
5+
listen 443 ssl;
6+
listen [::]:443 ssl;
7+
8+
server_name crowdsec-dashboard.*;
9+
10+
include /config/nginx/ssl.conf;
11+
12+
client_max_body_size 0;
13+
14+
# enable for ldap auth, fill in ldap details in ldap.conf
15+
#include /config/nginx/ldap.conf;
16+
17+
# enable for Authelia
18+
#include /config/nginx/authelia-server.conf;
19+
20+
location / {
21+
# enable the next two lines for http auth
22+
#auth_basic "Restricted";
23+
#auth_basic_user_file /config/nginx/.htpasswd;
24+
25+
# enable the next two lines for ldap auth
26+
#auth_request /auth;
27+
#error_page 401 =200 /ldaplogin;
28+
29+
# enable for Authelia
30+
#include /config/nginx/authelia-location.conf;
31+
32+
include /config/nginx/proxy.conf;
33+
include /config/nginx/resolver.conf;
34+
set $upstream_app crowdsec-dashboard;
35+
set $upstream_port 3000;
36+
set $upstream_proto http;
37+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+
# Uncomment these if you want to lower security, and
40+
# allow running in an iFrame (i.e. Organizr)
41+
#proxy_hide_header Content-Security-Policy;
42+
#proxy_hide_header X-Frame-Options;
43+
}
44+
}

0 commit comments

Comments
 (0)