Question

Configuring Healthchecks for DigitalOcean Apps

Posted November 25, 2020 337 views
Python FrameworksDigitalOcean App Platform

Hello, I’m working on a DOAppPlatform/FastAPI/SQLAlchemy template project. I’d like to configure health checks but have so far been unable to do so. Is there something wrong with my configuration?

https://github.com/justinrmiller/fastapi-sqlalchemy-doapp/blob/master/.do/app.yaml#L9

Thanks!
Justin

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

👋🏼 @jrmiller42

The health checks configuration looks right to me. Can you double check that they are being applied to your app? In the control panel, go to your app and, under the Settings tab, click on “View App Spec”. Do you see the correct config there?

If not, you will need to apply the spec to your existing app using doctl:

  1. Install doctl
  2. List your apps and find your app’s UUID: doctl apps list
  3. In the directory of your git repo, run: doctl apps update --spec .do/app.yaml APP-UUID. This will kick off a new deployment with the spec changes.
  • Thanks for the quick response. I have verified that the healthcheck entry is not showing up in “View App Spec”, even with a brand new deployment of the application from GitHub.

    • Got it. In that case you will need to use doctl to apply the spec. Correct me if I’m making the wrong assumption, but having a .do/app.yaml file in the repo doesn’t affect any new or existing App Platform apps that use that repo. It’s mostly a “standardized” path for storing an app spec, but it’s up to the user to consume.

      Syncing a live app config with a spec from the repo is something we’re exploring but that’s still in the very early stages.

      Does that help?

      • I think that makes sense. Unfortunately when I try that I get back the following error:

        Error: PUT https://api.digitalocean.com/v2/apps/<redacted UUID>: 404 Git branch not found

        Where “redacted UUID” is the first column returned by the app in doclt apps list.