Question

MongoDb from spec file failed to build

First, I was trying to deploy my app (docker container + mongodb) in DigitalOcean using spec file with service+database, but every deployment fails with the following error (app image is not even started to build):

Error: Database Not Found Component Issues db failed to build

And I’m even unable to see build error - I see the “Looks like something went wrong…” page.

Now, to have a shorter spec, I’m trying to deploy an app consisting only from the Mongodb instance, and the result is the same. My spec file:

name: db-debug
region: fra

databases:
  - engine: MONGODB
    name: db
    cluster_name: cluster
    num_nodes: 3
    production: true

First I have struggled with doctl since DO is not accepting version for mongodb and allows only “prod” deployment type, now this issue. Am I doing something wrong?


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.

Bobby Iliev
Site Moderator
Site Moderator badge
May 12, 2023

Hi there,

Indeed, you can add a dev database or an existing DigitalOcean database to your app at any time. Dev databases only support PostgreSQL at this time.

In case you want to see MongoDB supported as a dev database, the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

What you could do is to first create a MongoDB database cluster, and then use the name of the cluster and specify it in your App YAML definition.

That way the app will use your existing MongoDB cluster.

Best,

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.