kopia lustrzana https://github.com/OpenDroneMap/WebODM
Enable access log and log rotation
rodzic
16a8e3ca02
commit
1020e23afb
|
|
@ -140,7 +140,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||
# Python, GDAL, PDAL, nginx, letsencrypt, psql, git
|
||||
apt-get install -y --no-install-recommends \
|
||||
python$PYTHON_VERSION python$PYTHON_VERSION-distutils gdal-bin pdal \
|
||||
nginx certbot gettext-base cron postgresql-client gettext tzdata git
|
||||
nginx certbot logrotate gettext-base cron postgresql-client gettext tzdata git
|
||||
# Install webpack, webpack CLI
|
||||
npm install --quiet -g webpack@5.89.0
|
||||
npm install --quiet -g webpack-cli@5.1.4
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
# Automatically renew the SSL certificate (if needed)
|
||||
0 0 1 * * root source /webodm/.cronenv; bash -c "/webodm/nginx/letsencrypt-autogen.sh"
|
||||
|
||||
# Rotate logs
|
||||
0 0 * * * root logrotate -f /webodm/nginx/logrotate-nginx
|
||||
|
||||
# An empty line is required at the end of this file for a valid cron file.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
/var/log/nginx/*.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 1
|
||||
delaycompress
|
||||
compress
|
||||
notifempty
|
||||
create 0640 www-data adm
|
||||
sharedscripts
|
||||
postrotate
|
||||
if [ -f /tmp/nginx.pid ]; then
|
||||
kill -USR1 `cat /tmp/nginx.pid`
|
||||
fi
|
||||
endscript
|
||||
maxage 14
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ http {
|
|||
|
||||
# fallback in case we can't determine a type
|
||||
default_type application/octet-stream;
|
||||
access_log off;
|
||||
access_log /var/log/nginx/access.log '$remote_addr - [$time_local] "$request" $status';
|
||||
sendfile on;
|
||||
|
||||
upstream app_server {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ http {
|
|||
|
||||
# fallback in case we can't determine a type
|
||||
default_type application/octet-stream;
|
||||
access_log off;
|
||||
access_log /var/log/nginx/access.log '$remote_addr - [$time_local] "$request" $status';
|
||||
sendfile on;
|
||||
|
||||
upstream app_server {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue