-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
troubles trying to deploy monorepro with pnpm with dockerfile and dokku #57
Comments
Update, i found only the pnpm deploy command that generates a new clean working directory of a mono repro package. I wrote this bash script: That creates a new folder _deploy/my_app and then puts all mono repro code in it, i remove the dev dependencies and do a pnpm install for the @core packages im using. The only problems is that
Is still in my package.json. I now think i could scan my package.json for any BTW I create a new git init and add the git remote for dokku on each time the deploy command is run, i also make sure before to remove the whole ./deploy/$app_name path. What do you think? |
Hi, sorry but I am a bit lost, I never used Dokku and assumed it was a using standard Docker images. Some general advice:
prefer-workspace-packages=true
node-linker=hoisted
strict-peer-dependencies=false
auto-install-peers = true
Cannot help you more without looking into the whole project and trying for myself sorry! |
I got as far as Get the name of the application from the command line argument.app_name=$1 Check if the application exists.app_dir=$(find ./apps/* -type d -name "$app_name" -print0 | xargs -0 ls) Check if the second argument is "test" and modify the output accordingly.if [ "$2" = "test" ]; then The local test deployment works with this but requires each app to be faultless while one might be developing or refactoring code your unable go deploy or have to move in progress app out of /apps trmoporarily. The dokku deployment still doesent work since it does not have access to local packages this way. had a short break but already wasted another day on this not much feedback online so i probably end up dropping mono repro all together after spending lotts of time on it. maybe you have some final thoughts on how i could make it work wirh dokku? its just undeployable and the problem |
Full details here I posted this on turbo discord pnpm discord and renkx discord 10 |
I understand your frustration but it's really hard to help you without seeing the full code, environment, etc... that I could pull and run locally. Let's put dokku out of the equation for a moment, can you confirm that building AND running the Dockerfile locally works? docker build -t remix-gospel-stack-remix-app -f ./apps/remix-app/Dockerfile .
docker run -it --init --rm -p 3000:3000 --env-file .env.docker --env DATABASE_URL='postgresql://postgres:postgres@db:5432/postgres' --network=app_network remix-gospel-stack-remix-app The app must be running and accessible through localhost:3000 locally when you |
I fixed this in the end sorry my excuse for never posting back lost track. the solution was to deploy on a per app base the mino repro docs where misleading and putt me of guard. So what i do for dokku is have a seperate git for each alpp with a dockerfile and just do a git push remote. Which deploys the app. will post a example config tomorrow. |
Before using this mono repro I had a working Dockerfile and did a git push dokku master.
That way it would spin up a dokku deployment using the Dockerfile in the root of the project.
Since I switched to pnpm I have not been able to figure out the correct way to deploy, even using gpt4 ( no phun intended ) i tryed to find the correct methodology to deploy my apps.
Even while its a monorepro im still very used to cd to the /apps/myapp folder and do a pnpm dev
The same goes for deployments. I would do a
git push dokku master
which would initiate the deployment, perhaps that is out of the scope of this repro and my question but deploying isent working at all.This was my working Dockerfile:
https://gist.github.com/Jarrodsz/22ddc163d1cd8c628e6dd7597b042117
Now the problem even after changing this logical it still fails.
My modified pnpm version would assume to be:
https://gist.github.com/Jarrodsz/13fd50d2eb93914fec560e4364fec650
The problem is i seem to need to copy the package-lock.YAML file from the root of the mono repro, since it is not generated in my /mono_repro/apps/myapp/ folder.
GPT comes up with all kinds of obscure solutions not working.
What would be the correct way to gave an easy workflow for this?
I would like to just do a git push dokku master like im used to.
Is there way to generate the package-lock.yaml in the app folders somehow?
After 2 hours fiddling with the Dockerfile doing 100 deploys to test it and debug it I give up this is cybersome.
The text was updated successfully, but these errors were encountered: