Drasko DRASKOVIC

Results 127 comments of Drasko DRASKOVIC

Very strange, upon: ``` docker-compose -f docker/docker-compose.yml restart openresty ``` openresty spits all previous log on stdout and from there on starts sending access logs on stdout. Looks like something...

Indeed, `docker-compose -f docker/docker-compose.yml restart openresty` makes container dump all the logs on restart. I thought that these logs are outputed on `stdout` and never saved. If they are -...

@neomantra yes, I am aware of this, and I saw that same technique is applied in official [NginX Dockerfile](https://github.com/nginxinc/docker-nginx/blob/master/mainline/alpine/Dockerfile#L136). However - NginX logs work like a charm, everything is printed...

Is it possible that docker buffers `stdout` and not printing logs but saving them somewhere? because I can see that upon restart of this container all previous logs are spit...

Running container without `docker-compose` (and with without adding custom `nginx.conf`) logging works just fine: ``` drasko@Marx:~/go/src/github.com/mainflux/mainflux$ docker run -p 127.0.0.1:8000:80 openresty/openresty:alpine 172.17.0.1 - - [16/Mar/2019:15:44:32 +0000] "GET / HTTP/1.1" 200...

I tried to use raw docker (without docker-compose) and custom `ngin.conf` - works like a charm: ``` drasko@Marx:~/go/src/github.com/mainflux/mainflux$ docker run --volume `pwd`/docker/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf --volume `pwd`/docker/ssl/certs/mainflux-server.crt:/etc/ssl/certs/mainflux-server.crt --volume `pwd`/docker/ssl/certs/mainflux-server.key:/etc/ssl/private/mainflux-server.key --volume `pwd`/docker/ssl/certs/ca.crt:/etc/ssl/certs/ca.crt --volume `pwd`/docker/ssl/dhparam.pem:/etc/ssl/certs/dhparam.pem...

@neomantra thanks - I would like to investigate and solve this, because we really want to use OpenResty in Mainflux and allow mTLS and full X.509 client-side cert support for...

Fixed by mounting custom `nginx.conf` on default OpenResty location, as described in https://github.com/openresty/docker-openresty/issues/90

I have to re-open this issue. It was actually not solved when I added `proxy_pass` directives in `nginx.conf`. I have noticed that when openresty container starts before of other containers...

Maybe realted to this one: https://github.com/docker/compose/issues/2700 I do not understand however why mainstream NginX works in the same setup (with restart).