Validation for App Spect “Template”

I’m having some trouble getting the App Platform to recognize the format of my .do/deploy.template.yaml file. My in-progress template lives here.

While a deployed app’s spec seems to have all the resources (envs, services, databases, etc.) at the top-level, the “template” file requires that they be nested beneath a root spec key. This much makes sense (I guess?), but as far as I can tell, the setup wizard doesn’t really acknowledge anything within it.

It automatically detects the right type of application, but doesn’t pick up any additional Components, the declared databases, or prompt for the global envs I’ve defined.

The app spec reference is clear, but the deploy button how-to doesn’t quite fill in the gaps—or more to the point, doesn’t offer any more advice on how to deploy templates that define more than just a web Component.

Furthermore, the doctl apps spec validate .do/deploy.template.yaml appears to only support live schema, not the template structure, nor does it confirm what Components would be created.

Any help or (complex) examples is appreciated!

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @augustmiller 👋

The Deploy button currently has some limitations mentioned at the bottom of the how-to page:

Only the following combination of components are currently supported:

1 Service 1 Service + (Postgres) Dev Database 1 Static site 1 Static site + (Postgres) Dev Database

As you’ve also noticed, it doesn’t present app-level env vars in the UI but rather only component-level ones. Unfortunately I’m not sure it’s a good for CraftCMS in its current state given your requirements around the number of components and database types :(

I think it might be better to provide a standard app spec similar to what you currently have and instruct users to use doctl to create their apps—which supports all spec options—until the Deploy button is updated with support for more use cases.

Also, I noticed in the README you mention the following:

Ultimately, you manage databases in the regular Cloud dashboard, then “add” them to an app, exposing some aliases to make connections easier—but those resources have to be completely open to the web (behind only some mediocre passwords) to be compatible with the App Platform

This is actually no longer the case! You can configure your app as a trusted source for your database, see How to Manage Databases in App Platform.