Turborepo + Strapi v4 + Next.js + Docker

Hello strapi community!

I have made a monorepo template using Turborep, with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose. Feel free to check it out!

6 Likes

I had problems lifting the project in windows. Apparently it’s something related to crlf and lf, but I don’t have any knowledge on that subject. I found a commit* that claims to solve this problem, but it is related to the original turborepo repository. Could you help me?

The commit*: Fix yarn lockfile parsing on Windows by jaredpalmer · Pull Request #434 · vercel/turborepo · GitHub

Did you try to update the turborepo version in package.json, to see if the issue is resloved? Maye my repo is using an older version, I will have a check tmr maybe.

Thanks for your reply, Elvincth. I solved the problem by installing the “Change All End Of Line Sequence” extension in my vscode. I converted all line endings to LF (linux) and put LF in my vscode default settings as well.

Thank you so much. I’m new to web development and this makes my live so much easier!

Can you maybe explain to me how you deploy this to a server?

If you are using heroku to deploy the backend you could follow the monorepo deploy guide : https://michaellin.me/deploy-multiple-apps-in-monorepo-to-heroku/

For frontend if you are using netlify you could follow this guide: Monorepos | Netlify Docs

1 Like

Is it possible to have a monorepo and deploy backend on a PaaS and the frontend in another PaaS?

@LuisAlaguna - 100% possible.

Do you have any tutorial on how to do this?

depends what you use but most PaSS that has built in deployments, usually have the monorepo option of using a specific directory. I use vercel for my next app and railway for my backend and I basically have a monorepo, in my github action I simply call vercels or railways up process in the directory, nothing else to it.

Using Monorepos | Vercel Docs (this won’t be multiple PaSS)

And yeah the docs of the services you use usually have this information.