DigitalOcean docker production target with cloud database bug?

Hi George
I must be doing something wrong but I can't understand what I created servers and connections before with no trouble.

I have deleted the server, the keys the databases and started completely from scratch.

This what I am trying to achieve:
-On DO I want to create 2 cloud databases one for dev and 1 for production.
-I want to test the development app locally on my pc with a connection to the dev cloud db.
-I would obviously like to publish the app on the DO server with access from the app to the db via vpc network.

As I have no idea where I'm going wrong
it would be be really helpful if you could just explain the procedure from start to finish how to achieve this, including creating new ssh keys etc. I really appreciate your patience...

We just released a Wappler 6.6.0 update that solve some of the problems you have.

You need to edit your project options and for targets using digital ocean managed databases, you can now enter required SSL options and add a ca cert file that you can download from digital ocean admin panel. Make sure that over SSH is off.

Also the deprecated version field is now removed from the docker composer files.

So try it and let me know how it goes.

1 Like

Hey @JBM how did you get on with the new update to Wappler? Did it resolve any of the issues you were experiencing?

Hi Cheese, It solved the problem with the security provider returning null even when login was successful...so that I should be thankful for.

However i still cannot create a new server from the resource manager or import one from DigitalOcean that provides me with a working web server....followed the tutorial word for word repeatedly but no matter what type of droplet it is it will not connect.
The cloud dbs work perfectly but the server will not allow a connection. My ssh keys are fine as I have used them many times before. I am at a loss as to what to do next.

A step forward is always good so that is positive at least one issue has been resolved! How about trying to set up a new Droplet the old fashioned way using Targets? Did you give that a bash?

Yes Cheese, tried that no joy, stripped it all back to the bare minimum tried different versions ubunto and ssh just get this message:

Hmmm not seen that error before.

Wappler-compose_proxy not found

What about if you try naming the Project to prPrismApp and drop the hyphens and underscores?

Could try:

Hey Cheese,
thanks for being there and your help so far...I have made a bit of progress with your suggestion of creating the droplet via targets...Local connection fine but remote not so, getting the half green circle of near doom
image
using ssl

Question The certs issue- if I copy the lets encrypt ssl cert to my local drive from DO won't it expire and I will have to replace it every couple months?
Bit confused...

You should not need to copy anything to the local drive (it is domain related so will cause an error under local host). Lets Encrypt certificates require to be renewed every three months. Have you deployed the Lets Encrypt services with your Droplet?

Click on Manage in the Remote Target settings and pick the Droplet you want to configure:

Then click the little spanner icon:

And Install Traefik and Apply. Then Deploy. Could take a while for Certbot to generate the certificate. If you are on Cloudflare remember to Pause it while this process takes place otherwise it won't be able to reach the host.

If kind members of this Community and the Team didn't help me in the past I'd be asking the same questions. We all have to help each other out, its no problem but appreciate the acknowledgement James! You're more than welcome.

:wink:

The only certificate you may need to add is for the Digital Ocean Database Cluster if this is what you are using but we'll move on to that once we get you up and running if needs be. Other than that it's the SSH Key which is stored locally, and this can be generated when required, and on creation will automatically install it to the correct location (and if it is not there you can always generate a new one).

@Cheese James is using the Resource Manager, so all those docker machines settings do not apply.

And in the Resource Manager you can install Traefik indeed for the auto renewal of lets encrypt.

@JBM when you install Traefik, then the

will be solved.

1 Like

@George

1 Like

Well tried everything with no joy...George I was not using the resource manager because clearly that doesn't work.

I started again following to the letter both tutorials on using the resource manager and adding DO cloud databases.

I can only ever get a local development connection with a DO cloud database with these settings

but I can NEVER get a remote production connection with these settings:

Everything is setup properly in the resource manager:
image

I now get this error message when fetching data from db:
image

I get this error message when trying to deploy production:

For PostgreSQL databases on Digital Ocean, you not only need to select "Use SSL" but also set the profile to "Digital Ocean"and specific a CA Key File - that you can download from the digital ocean admin console for the managed database and save in your /certs/ folder of your project.

Login to Digital Ocean, go to your Database Cluster and use the "Download CA Certificate" option in the connection settings.

See How to Connect to PostgreSQL Database Clusters :: DigitalOcean Documentation

Then save the downloaded file in your project folder under /certs folder (create if needed) and you can select it then from the Use SSL options for the target.

@Teodor will adjust that in our docs Using Managed Databases with the Resource Manager

need to update docs to handle required SSL options for Digital Ocean Managed databases when using PostgresSQL at Using Managed Databases with the Resource Manager

But my DO cloud database is mySQL?

Tried ssl on and off with same results

Yes indeed you need to do the same if you enable SSL for you MySQL database on digital ocean managed databases.

You need then also to choose the profile and select the CA Cert file.

For mySQL SSL is optional, while for Postgres it is required on Digital Ocean Managed database connections.

Yes but as discussed this does not solve the problem of still not being able to connect to the remote server

Well this should solve your database connection errors, what other errors did you got?