Islandora-Devops / isle-site-template

Template for building and customising your institution's Islandora installation.
MIT License
5 stars 6 forks source link

Trust local, dev CA in containers #28

Closed joecorall closed 9 months ago

joecorall commented 10 months ago

For the dev profile, a locally trusted CA is created and used to serve TLS traffic on https://islandora.dev.

This locally signed CA is not trusted by containers, only by the host operating system.

isle-buildkit already updates the proper CA trust store in the base s6 overlay. We can use this to trust the local CA inside other containers.

Testing

Create a site using the isle-site-template and start the dev profile

docker compose --profile dev up -d

Add media to your site, and see that no derivates are created.

Use this PR's YML and bring down your containers and backup and see the derivates are created

docker compose stop
docker compose --profile dev stop
docker compose --profile dev up -d
joecorall commented 10 months ago

The Crayfits microservice still does not create derivatives even with this PR. That will be resolved with https://github.com/Islandora/Crayfish/pull/180

However, this PR still fixes other derivative creation, e.g. hypercube, houdini, etc.

seth-shaw-asu commented 9 months ago

I'm not able to reproduce. My image derivatives work without the PR: Screenshot 2023-12-13 142830

seth-shaw-asu commented 9 months ago

Tried again today. FITS indeed wasn't working. I applied the patch but that didn't fix the issue. The Crayfits container reports:

2024-01-03 11:22:47 [2024-01-03 19:22:47] php.INFO: User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"Symfony\\Component\\Debug\\DebugClassLoader\" class is deprecated since Symfony 4.4, use \"Symfony\\Component\\ErrorHandler\\DebugClassLoader\" instead. at /var/www/crayfish/CrayFits/vendor/symfony/debug/DebugClassLoader.php:16)"} []
2024-01-03 11:22:47 [2024-01-03 19:22:47] request.INFO: Matched route "app_fits_exec". {"route":"app_fits_exec","route_parameters":{"_route":"app_fits_exec","_controller":"App\\Controller\\FitsController::generate_fits"},"request_uri":"http://crayfits:8000/","method":"GET"} []
2024-01-03 11:22:47 [2024-01-03 19:22:47] request.CRITICAL: Uncaught PHP Exception ErrorException: "Warning: Undefined variable $response" at /var/www/crayfish/CrayFits/src/Controller/FitsController.php line 62 {"exception":"[object] (ErrorException(code: 0): Warning: Undefined variable $response at /var/www/crayfish/CrayFits/src/Controller/FitsController.php:62)"} []
2024-01-03 11:22:47 172.18.0.16 - - [03/Jan/2024:19:22:47 +0000] "GET / HTTP/1.1" 500 78393 "-" "Apache-HttpClient/4.5.13 (Java/17.0.9)" "-"
joshdentremont commented 9 months ago

I'm also not seeing any difference with these changes. When I try to create derivatives it's working for everything but fits, with or without this change. @joecorall What buildkit version are you running that isn't creating other derivatives? I'm running 2.0.10.

joecorall commented 9 months ago

Thanks, guys. Sorry for the false-positive. I must have had some wires crossed somewhere. The crayfits issued should be cleared up with https://github.com/Islandora/Crayfish/pull/180