Closed rogierlommers closed 1 year ago
Hi Rogier, good to hear you're still enjoying DSMR Reader in Docker!
It's possible to disable the healthcheck via the docker-compose file:
healthcheck:
disable: true
Disabling the nginx access.log isn't possible currently, but maybe I`ll add it in a future release. Ofcourse it's always possible to map a nginx config file to the Docker container that contains settings according your wishes :).
Hey @xirixiz , not sure if you accept merge requests. But here you have one: https://github.com/xirixiz/dsmr-reader-docker/pull/305
Ofcourse I do! I like contributions/PR's! Thanks!
Will take a look at it later Today.
Released!
hmz.. it doesn't seem to work though:
root@dsmr_reader_docker:/app# cat /etc/nginx/conf.d/dsmr-webinterface.conf
upstream dsmr-webinterface {
server unix:///tmp/gunicorn--dsmr_webinterface.socket fail_timeout=0;
}
server {
listen 80;
server_name _; # No hostname available? Just use the default underscore here for wildcard matching.
# Uncomment these lines below to force additional authentication on application access.
# NOTE: Alter the IP-range '192.168.1.0/24' if you are using a different one (i.e.: 10.0.x.x)!
# WARNING: Do not forget to generate a password first in '/etc/nginx/htpasswd' and then RELOAD nginx (TEST IT)!
## satisfy any;
## allow 192.168.1.0/24;
## deny all;
## auth_basic "Restricted application";
## auth_basic_user_file /etc/nginx/htpasswd;
location /static {
alias /var/www/dsmrreader/static;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://dsmr-webinterface;
}
}
I would expect a line that says: access_log off
Can I somehow validate that this function has been executed?
The function hasn't been executed :). The function you created doesn't work unfortunatly.
-z should be -n .... fixing it now.
If you run docker logs -f dsmr
you should see an echo passing by "Disabling NGINX access logs...".
New release ready. Seems to work.
[ INFO ] Disabling NGINX access logs...
yup, just re-deployed and indeed it works. Thanks!
Request
Hey! Still using your docker-compose file. Love it! I have one question though: I see a lot of access logs. Is it somehow possible to disable them?
I guess they come from this, right? Simply disabling the healthchecks would fix them.
But what about the "normal" access logs? I'm not interested in them, since I get access logs from my reverse proxy. Is it possible to disable access logs in general?