mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-06 21:00:10 +00:00
Compare commits
1 Commits
68b4f39bba
...
v2.12.3
Author | SHA1 | Date | |
---|---|---|---|
|
c5a319cb20 |
@@ -12,11 +12,7 @@ Model.knex(db);
|
|||||||
|
|
||||||
const boolFields = [
|
const boolFields = [
|
||||||
'is_deleted',
|
'is_deleted',
|
||||||
'ssl_forced',
|
|
||||||
'http2_support',
|
|
||||||
'enabled',
|
'enabled',
|
||||||
'hsts_enabled',
|
|
||||||
'hsts_subdomains',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
class DeadHost extends Model {
|
class DeadHost extends Model {
|
||||||
|
@@ -8,8 +8,8 @@ const now = require('./now_helper');
|
|||||||
Model.knex(db);
|
Model.knex(db);
|
||||||
|
|
||||||
const boolFields = [
|
const boolFields = [
|
||||||
'is_deleted',
|
|
||||||
'enabled',
|
'enabled',
|
||||||
|
'is_deleted',
|
||||||
'tcp_forwarding',
|
'tcp_forwarding',
|
||||||
'udp_forwarding',
|
'udp_forwarding',
|
||||||
];
|
];
|
||||||
|
@@ -22,7 +22,8 @@
|
|||||||
"enabled",
|
"enabled",
|
||||||
"locations",
|
"locations",
|
||||||
"hsts_enabled",
|
"hsts_enabled",
|
||||||
"hsts_subdomains"
|
"hsts_subdomains",
|
||||||
|
"certificate"
|
||||||
],
|
],
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@@ -9,15 +9,6 @@
|
|||||||
"url": "http://127.0.0.1:81/api"
|
"url": "http://127.0.0.1:81/api"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"components": {
|
|
||||||
"securitySchemes": {
|
|
||||||
"bearerAuth": {
|
|
||||||
"type": "http",
|
|
||||||
"scheme": "bearer",
|
|
||||||
"bearerFormat": "JWT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"/": {
|
"/": {
|
||||||
"get": {
|
"get": {
|
||||||
|
@@ -3,54 +3,26 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Lowercase
|
log_info 'Setting ownership ...'
|
||||||
SKIP_FILE_OWNERSHIP=$(echo "${SKIP_FILE_OWNERSHIP:-}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
|
|
||||||
if [ "$SKIP_FILE_OWNERSHIP" == "true" ] || [ "$SKIP_FILE_OWNERSHIP" == "on" ] || [ "$SKIP_FILE_OWNERSHIP" == "1" ] || [ "$SKIP_FILE_OWNERSHIP" == "yes" ]; then
|
# root
|
||||||
log_info 'Skipping data and letsencrypt ownership, use only with caution ...'
|
chown root /tmp/nginx
|
||||||
# root
|
|
||||||
chown -R "$PUID:$PGID" /run/nginx
|
# npm user and group
|
||||||
chown -R "$PUID:$PGID" /tmp/nginx
|
chown -R "$PUID:$PGID" /data
|
||||||
chown -R "$PUID:$PGID" /var/cache/nginx
|
chown -R "$PUID:$PGID" /etc/letsencrypt
|
||||||
chown -R "$PUID:$PGID" /var/lib/logrotate
|
chown -R "$PUID:$PGID" /run/nginx
|
||||||
chown -R "$PUID:$PGID" /var/lib/nginx
|
chown -R "$PUID:$PGID" /tmp/nginx
|
||||||
chown -R "$PUID:$PGID" /var/log/nginx
|
chown -R "$PUID:$PGID" /var/cache/nginx
|
||||||
|
chown -R "$PUID:$PGID" /var/lib/logrotate
|
||||||
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
chown -R "$PUID:$PGID" /var/lib/nginx
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
chown -R "$PUID:$PGID" /var/log/nginx
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
||||||
|
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
||||||
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|
# Prevents errors when installing python certbot plugins when non-root
|
||||||
|
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
||||||
# Prevents errors when installing python certbot plugins when non-root
|
find /opt/certbot/lib/python*/site-packages -not -user "$PUID" -execdir chown "$PUID:$PGID" {} \+
|
||||||
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
|
||||||
find /opt/certbot/lib/python*/site-packages -not -user "$PUID" -execdir chown "$PUID:$PGID" {} \+
|
|
||||||
|
|
||||||
else
|
|
||||||
log_info 'Setting ownership ...'
|
|
||||||
# root
|
|
||||||
chown root /tmp/nginx
|
|
||||||
|
|
||||||
# npm user and group
|
|
||||||
chown -R "$PUID:$PGID" /data
|
|
||||||
chown -R "$PUID:$PGID" /etc/letsencrypt
|
|
||||||
chown -R "$PUID:$PGID" /run/nginx
|
|
||||||
chown -R "$PUID:$PGID" /tmp/nginx
|
|
||||||
chown -R "$PUID:$PGID" /var/cache/nginx
|
|
||||||
chown -R "$PUID:$PGID" /var/lib/logrotate
|
|
||||||
chown -R "$PUID:$PGID" /var/lib/nginx
|
|
||||||
chown -R "$PUID:$PGID" /var/log/nginx
|
|
||||||
|
|
||||||
# Don't chown entire /etc/nginx folder as this causes crashes on some systems
|
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx
|
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
|
|
||||||
chown -R "$PUID:$PGID" /etc/nginx/conf.d
|
|
||||||
|
|
||||||
# Prevents errors when installing python certbot plugins when non-root
|
|
||||||
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
|
|
||||||
find /opt/certbot/lib/python*/site-packages -not -user "$PUID" -execdir chown "$PUID:$PGID" {} \+
|
|
||||||
fi
|
|
||||||
|
@@ -10,7 +10,6 @@ log_info 'IPv6 ...'
|
|||||||
|
|
||||||
# Lowercase
|
# Lowercase
|
||||||
DISABLE_IPV6=$(echo "${DISABLE_IPV6:-}" | tr '[:upper:]' '[:lower:]')
|
DISABLE_IPV6=$(echo "${DISABLE_IPV6:-}" | tr '[:upper:]' '[:lower:]')
|
||||||
SKIP_FILE_OWNERSHIP=$(echo "${SKIP_FILE_OWNERSHIP:-}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
|
|
||||||
process_folder () {
|
process_folder () {
|
||||||
FILES=$(find "$1" -type f -name "*.conf")
|
FILES=$(find "$1" -type f -name "*.conf")
|
||||||
@@ -32,17 +31,9 @@ process_folder () {
|
|||||||
echo "$(sed -E "$SED_REGEX" "$FILE")" > $FILE
|
echo "$(sed -E "$SED_REGEX" "$FILE")" > $FILE
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# ensure the files are still owned by the npm user
|
||||||
# ensure the files are still owned by the npm user
|
chown -R "$PUID:$PGID" "$1"
|
||||||
chown -R "$PUID:$PGID" "$1"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# process files on base image
|
|
||||||
process_folder /etc/nginx/conf.d
|
process_folder /etc/nginx/conf.d
|
||||||
# conditionally process files that are probably in a volume or bind
|
process_folder /data/nginx
|
||||||
if [ "$SKIP_FILE_OWNERSHIP" == "true" ] || [ "$SKIP_FILE_OWNERSHIP" == "on" ] || [ "$SKIP_FILE_OWNERSHIP" == "1" ] || [ "$SKIP_FILE_OWNERSHIP" == "yes" ]; then
|
|
||||||
log_info 'Skipping data and letsencrypt ownership, use only with caution ...'
|
|
||||||
else
|
|
||||||
process_folder /data/nginx
|
|
||||||
fi
|
|
||||||
|
Reference in New Issue
Block a user