Question

How to use App Platform when all components are in a singe repository

I have an app where the API app and front-end app are in subfolders of the project repository because I use Docker Compose when developing. When I tried to add to the App Platform, I received the error that it could not detect how to build and didn’t let me give it any guidance.

Apps Platform seems like exactly what I need for this project, but I don’t like the idea of splitting the project up into 2 repositories (would break Compose, etc.). Can I reorganize my project to make it auto-detectable, or use the App Spec YAML in way that lets me keep my project in one repository?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@drewsign 👋

You can do this today using doctl and a custom app spec, but we don’t expose a way to do it in the UI just yet.

We have a sample monorepo app and spec here: https://github.com/digitalocean/sample-monorepo/blob/main/.do/app.yaml — Notably, the source_dir field on component specs can be used to reference a sub-directory in your repo.

You can submit the spec using:

doctl apps create --spec .do/app.yaml

Check out the spec reference for more about what can be configured through it.