What are the best practices for setting up repo,fi...
# general
b
What are the best practices for setting up repo,file structure, and environment control? I have several isolated products that will be created. There may be services setup for communication between those products.
m
It’s a great and common question. Have you had a look at this page yet? https://www.pulumi.com/docs/using-pulumi/organizing-projects-stacks/
b
Thanks for the reference @miniature-musician-31262! I have not seen this but will look through it and let you know if anything.
f
We have been having great success with the "monorepo" pattern. It looks something like this:
Copy code
stacks/
    stackA/
    ... folder per stack
components/
    componentA/
    componentB/
This lets us re-use components throughout multiple stacks.
b
@fast-sandwich-30809 sorry for the delay here! What kind of components are these? I'm guessing stackA references componentA?
f
@bored-car-93231, no problemo - StackA and StackB are wholly independent stacks, but any components that they may need to share go in the components folder. In this way, you can keep developing new capabilities, and use them in whichever stacks may need them. Components are just modules, in whatever language you're using. I have one "component" for azure function apps, but 30+ stacks can depend on it. It's a good way to keep maintenance focused to one place
b
Ah, I like this a lot! It provides a lot of flexibility as well! Thanks for sharing Ethan!