Hey! I have a yarn workspaces monorepo with packages/frontend and packages/backend directories and I just want to deploy packages/backend. I already defined the source_dir so it points to it but then DO can’t find a yarn.lock because it only exists at the root and not in packages/backend.
How can I configure it so it can find the yarn.lock at the root but only deploys the packages/backend directory?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @rudolphmarvin,
If you want to deploy the code present in packages/backend folder, specifying the source_dir with the folder name(packages/backend) is the right way. When you specify the source_dir that becomes the current working directory for your applications and only the files present in that folder are considered.
Since yarn.lock is not present in the packages/backend and app does not have access to the trailing folders(root folder of your repo), it is not found. In order for it to be detected, please ensure that the package.json, yarn.lock and other necessary files are present in the current folder(packages/backend) in this case.
In case you have any doubts, please reach out to our support team and we’d be glad to help.
Cheers, Taha Fatima
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.