timlrx / tailwind-nextjs-starter-blog

This is a Next.js, Tailwind CSS blogging starter template. Comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs.
https://tailwind-nextjs-starter-blog.vercel.app/
MIT License
8.9k stars 2.07k forks source link

Add Docker support #1046

Closed eshut closed 2 weeks ago

eshut commented 4 weeks ago

Add Docker Support for Tailwind Next.js Starter Blog

This PR adds Docker support for the Tailwind Next.js Starter Blog, allowing users to easily run and deploy the blog in a containerized environment.

Why This Change

After reviewing Issue #1004, I realized the current documentation lacked guidance on setting up Docker for this project. The solution provided by @timlrx didn’t fully address the issue, and I spent around 4 hours troubleshooting to understand and resolve it.

Changes Made

Benefits

Related Issue

Closes #1004

Additional Notes

Let me know if there are any adjustments or additional documentation needed. I hope this contribution makes Docker support accessible and reduces troubleshooting time for others!

vercel[bot] commented 4 weeks ago

@eshut is attempting to deploy a commit to the timlrx's projects Team on Vercel.

A member of the Team first needs to authorize it.

eshut commented 4 weeks ago

@timlrx Please also see #1047 as well

timlrx commented 3 weeks ago

I understand what you are trying to do, but I think my suggested approach of using the official example repo dockerfile results in a better production build with full feature parity and optimised image size. The current proposed solution only targets a static build.

If that's what you are looking for then glad to see it work! However, I would not suggest that as the default docker build. Perhaps I could add a README page for someone who is looking to deploy it via docker, without having to search through the issues or nextjs docs.

eshut commented 3 weeks ago

Yes @timlrx , thanks. That would be nice to have in README as an alternative

timlrx commented 2 weeks ago

Added over here - https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/main/faq/deploy-with-docker.md