startork's avatar

Accessing internal file using sail and wkhtmltopdf

I am using wkhtmltopdf to generate PDF's within a docker container built by laravel sail. The pdf is using css files hosted by the same laravel project. If I go to the css url in my browser then the file is loaded correctly however, when wkhtmltopdf tries to download the file it always times out. I have tried using localhost/host.docker.internal as the domain and these don't timeout but they also don't load the css file.

How can I access the project from it's own docker container?

Thanks

EDIT: Turns out it is because laravel sail uses php artisan server as a web server. This is single threaded so any 'requests within requests' always timeout.

0 likes
0 replies

Please or to participate in this conversation.