Closed tareko closed 2 years ago
Hi thanks. Interesting I am tracking a similar issue over in another repo. The difference with yours is you are doing a first boot and seeing issues.
In your logs can you see if the following is present? I think if the container isn't fully stopped (docker-compose down as you say) then it will write the access log directive multiple times (which happens here: https://github.com/tiredofit/docker-nginx-php-fpm/blob/9cf2fb7f79f1e49190c3060c232aca84d599094f/install/etc/cont-init.d/20-php-fpm#L87)
[cont-init.d] 00-startup: executing...
�[100m[NOTICE]�[49m ** [container-init] Detected Container that has been restarted - Cleaning '/tmp/state' files
For your first report - You would want to set the following environment variables:
PLUGIN_WEBSERVICE=FALSE
PLUGIN_REST=FALSE
I think I know exactly whats going on here and I am building a new version of the upstream image (tiredofit/nginx-php-fpm). Following successful build I will make a new build of tiredofit/fusiondirectory which should alleviate this. Although to close the loop and satisfy my curiosity if you could let me know if you see that string above.
New image should be available and fix above issues, let me know.
Hello friend. My apologies for the radio silence. I was in the middle of a busy time at work. You have fixed the issue!
I tried to replicate it by doing docker-compose up, ctrl-c to close once up, then docker-compose up. There are no issues.
I deleted the image for fusiondirectory
(docker rmi
) before issuing the up command to ensure it downloaded the new image.
Thank you so much for this! I'll mark as closed successfully for now.
Fantastic!
Summary
Two errors exist in the current docker image.
rest.template
is written in multiple times, which means it causes an error after first boot and no web service/etc/php-fpm/fpm/php-fpm.conf
has a string added to the last line with each boot, causing FPM to not start.Steps to reproduce
docker-compose up -d
docker-compose stop
docker-compose up
What is the expected correct behavior?
FD should boot up and become accessible
Environment
Possible fixes
Regarding the first error, a workaround is:
install/etc/nginx/conf.d/default.conf
:include /etc/nginx/conf.available/rest.template;
docker build . -t tiredofit/fusiondirectory:1.4
Regarding the second error, I have no fix. This is how the error manifests when looking at the last line of
/etc/php-fpm/fpm/php-fpm.conf
:access.format='%{%Y-%m-%dT%H:%M:%S%z}T %{HTTP_X_FORWARDED_FOR}e %R %u %s %m "%{REQUEST_URI}e" %{HTTP_X_REQUEST_ID}e %{SERVER_PROTOCOL}e %l "%{HTTP_REFERER}e" "%{HTTP_USER_AGENT}e" %M %C %d'access.format='%{%Y-%m-%dT%H:%M:%S%z}T %{HTTP_X_FORWARDED_FOR}e %R %u %s %m "%{REQUEST_URI}e" %{HTTP_X_REQUEST_ID}e %{SERVER_PROTOCOL}e %l "%{HTTP_REFERER}e" "%{HTTP_USER_AGENT}e" %M %C %d'access.format='%{%Y-%m-%dT%H:%M:%S%z}T %{HTTP_X_FORWARDED_FOR}e %R %u %s %m "%{REQUEST_URI}e" %{HTTP_X_REQUEST_ID}e %{SERVER_PROTOCOL}e %l "%{HTTP_REFERER}e" "%{HTTP_USER_AGENT}e" %M %C %d'
Note that the correct line is repeated multiple times. I can't find the origin of this particular error.
One workaround here is to do
docker-compose down
thendocker-compose up
each time.