does anyone have a good guide on how to
# 💻creators-and-apify
k
does anyone have a good guide on how to set up a monorepo? I know I can just ask an llm, but I didn't get a good anwser, and would appreciate advice from someone with experience. I use a mix of both python and js scrapers, but mostly it's 80% js.
l
See the monorepo example here https://docs.apify.com/platform/actors/development/deployment/source-types#actor-monorepos You can either have single src and have all actors just .actor folders (ofc that only makes sense for JS or Python). Or have each Actor have its own codebase (you can still have shared Dockerfiles and internal packages etc.)
k
Thanks. I just moved to a monorepo following that example repo
But I am new to this github deployment process. I have used the deployment key to connect to connect to github repo. I was also able to build an actor using that.
But how would I do something like 'apify push' using this. Apify has an integration to build actors on every push - But will that build every single actor I have on push? - What if I want to push actors individually? - Do I have use the web platform for that?
Also about git, I've never used a monorepo. Is it normal for the commits of all actors to be in the same place?
i
You can launch builds using Apify cli
I myself have a monorepo, but I launch builds locally using the CLI
k
But i get this: Actor context path "../.." is outside of Actor root directory!
When i searched the channel, is saw the @Maxime Dupré was having the same issue as well.
I just had to delete the dockercontextdir key in actor.json, and now I'm able to push it.
But what about git? How do you keep the logs seperate for each actor?
p
you don't. Thats the point of a monorepo
k
got it
till now I'm having a good experience. Should've mode earlier. It's so much easier to manage, and also saves storage
4 Views