timonweb / django-tailwind

Django + Tailwind CSS = 💚
https://django-tailwind.readthedocs.io
MIT License
1.45k stars 89 forks source link

Hosting on render.com #158

Closed abrichr closed 1 year ago

abrichr commented 1 year ago

If hosting on render.com, the following additions are required to build.sh:

python manage.py tailwind install --no-input
python manage.py tailwind build --no-input

This should come before the collectstatic call:

python manage.py collectstatic --no-input

However this results in the build hanging seemingly forever:

Dec 6 02:00:33 PM  ==> Uploading build...
Dec 6 02:00:49 PM  ==> Build uploaded in 11s
Dec 6 02:00:49 PM  ==> Build successful 🎉
Dec 6 02:00:49 PM  ==> Deploying...

I tried removing node_modules at the end of the build.sh, but this does not appear to have any effect:

rm -rf theme/static_src/node_modules

Looks like this is a common complaint with render.com: https://community.redwoodjs.com/t/bad-performance-of-redwood-app-on-render-com/4147/12

This issue is not specific to django-tailwind, but perhaps someone knows of a workaround.

Edit: the build succeeded after 37 minutes.