Question

Why doesn't App Platform recognize a static content web from index.htm?

Posted December 11, 2020 1.2k views
GitDigitalOceanHTMLSpin UpDigitalOcean App Platform

I have followed the tutorial in an attempt to build my App from static content.

My static content includes :
index.htm
/js/*.js files
/cs/main.css

When the app wizard gets to the point where it is “fishing” for my content against my github repo then it fails stating…

App detection failed
We’re sorry, but we weren’t able to detect anything that the App Platform can currently run in the repository you selected. Please try a different repository.

Rename index.htm to index.html
I decided to rename my index.htm to index.html and try it again.
Guess what? That fixed it.

Please fix this bug.

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.

×
Submit an Answer
1 answer

Unfortunately the UI does not support altering the index_document at this time. You can create an application via the doctl that will accomplish what you want.

We allow you to specify a custom index_document at the component level. For your example, an app-spec similar to the following would work.

name: sample-html
static_sites:
- environment_slug: html
  github:
    branch: main
    repo: ...
  name: site
  index_document: index.htm

You could then create it via:

doctl app create --spec <path-to-spec>

I’ll create an internal ticket as well to track better supporting this feature in the UI as well.

Thank you for the feedback!

  • Thanks for answering this so quickly. It was quite confusing since I was attempting to use the App wizard for the first time today and the error was a bit cryptic / non-specific.