Unable to bringing up davis using docker-compose
joaofl opened this issue · comments
I followed your instructions from here in order to get the dav servers up, as from here
https://github.com/tchapi/davis#full-stack
After doing the first run migration, I can access the dashboard without any problem.
However, I get error 500 when trying to access the status root page:
And also any address under http://my-ip:9000/dav
I also could not yet fully understand where to expect the webdav paths to be shared outside the docker, or what I am actually missing.
The three logs from the nginx db and davis containers look good, except for the lines reflecting the error 500.
192.168.80.4 - 01/Feb/2023:21:34:12 +0000 "GET /index.php" 500
Any idea what could the problem be?
Thanks for the support, and congrats for the initiative.
Hi there 👋🏼
Can you show me the application logs? They should be in somewhere in ./var/log
(relative to the app path) in the applicative container (davis)
Here it goes. Good that you told me, because I could not find those logs before. But it seems it has to do with the permissions to the mapped dirs.
Actually, in the docker-compose, i would map those folders to a local one, instead of a docker volume.... ?
[2023-02-01T22:34:11.859649+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:34:11.862663+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:34:11.865078+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:34:11.865082+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:11.865085+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:11.904012+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:34:12.494681+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:34:12.497714+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:34:12.500102+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:34:12.500106+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:12.500109+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:12.536723+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:34:12.921960+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:34:12.925687+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:34:12.928420+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:34:12.928426+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:12.928430+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:12.964073+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:34:13.148013+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:34:13.152059+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:34:13.155111+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:34:13.155116+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:13.155120+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:13.190686+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:34:13.441898+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:34:13.445632+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:34:13.448362+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:34:13.448368+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:13.448371+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:34:13.482891+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:41:09.250549+01:00] request.INFO: Matched route "home". {"route":"home","route_parameters":{"_route":"home","_controller":"App\\Controller\\DAVController::home"},"request_uri":"http://10.0.0.2:9000/","method":"GET"} []
[2023-02-01T22:41:09.253249+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:41:09.255421+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:41:09.255425+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:41:09.255428+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:41:09.291361+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
[2023-02-01T22:47:19.795840+01:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\\Controller\\DAVController::dav","path":""},"request_uri":"http://10.0.0.2:9000/dav/","method":"GET"} []
[2023-02-01T22:47:19.798568+01:00] php.INFO: User Deprecated: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/security-guard 5.3: The \"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator\" class is deprecated, use the new authenticator system instead. at /var/www/davis/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php:35)"} []
[2023-02-01T22:47:19.800748+01:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} []
[2023-02-01T22:47:19.800753+01:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:47:19.800756+01:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Guard\\Authenticator\\GuardBridgeAuthenticator"} []
[2023-02-01T22:47:19.836186+01:00] request.CRITICAL: Uncaught PHP Exception Exception: "The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions." at /var/www/davis/src/Controller/DAVController.php line 268 {"exception":"[object] (Exception(code: 0): The WebDAV temp dir and/or public dir are not available. Make sure they are created with the correct permissions. at /var/www/davis/src/Controller/DAVController.php:268)"} []
Yes, sabre/dav
(the underlying dav lib) is complaining about the webdav folders. What did you set them to?
I kept the defaults... I believe it was not mentioned on the README. In any case, I believe the normal user would assume those to already be mapped outside the docker?
I'll give a try asap and eventually propose some improvements on the compose, such that the bring-up requires the minimum changes.
Do you have any suggestions on the best practices ?
The defaults are:
WEBDAV_TMP_DIR='/tmp'
WEBDAV_PUBLIC_DIR='/webdav'
but they must exist, either in the container directly (but that's not really what you want for a persistent setup), or mapped to a local folder (so you can keep them between container reboots).
In any case, the rights must be correctly set so that the container user can r/w to them. If they're in the container, it's generally not a problem (the default /tmp
works well, and you just need to create the /webdav
folder or set it to /tmp
too since anyway, nothing will persist). If you're mapping to a local directory, then I generally tend to create a volume named (for instance) webdav_volume
, and use it in the container as such (in the docker-compose.yml
file)
volumes:
- webdav_volume:/webdav
But then again, that requires that you set the rights correctly from within the container (it's simpler) with chmod/chown
so that the container user can access it
After adding that volume it works, but to some extent..
One thing which is not working is the .env.local
overwrite. Settings that I change there are not applied, so I need to change the on the actual .env file so they are applied.
Another thing which I am not sure is how to use the webdav. once I connect from my file browser (naltilus) to <myip>:9000/dav/webdav
I am prompted for user/pass, which allow me to connect just fine. But once I try to create a dir or file, I gets lots of errors on the log. Am I missing something?
In any case, shouldn't this be on the docker-compose.yml
file by default?
@@ -55,9 +55,12 @@ services:
- mysql
volumes:
- davis_www:/var/www/davis
+ - webdav:/webdav
volumes:
davis_www:
name: davis_www
database:
name: database
+ webdav:
+ name: webdav
If I create a file/folder directly inside the /webdav
dir it does reflect in the webapp and on my file browser.... Which makes me believe that the davis container does not have the rights to create files and folders
One thing which is not working is the
.env.local
overwrite. Settings that I change there are not applied, so I need to change the on the actual .env file so they are applied.
You should use env vars, not overwrite the .env.local
file
If I create a file/folder directly inside the /webdav dir
With which user? On the container or on the host?
I try to create a dir or file, I gets lots of errors on the log
Which kind of errors?