Remote DB on Digital Ocean

Ok I have reached a level of frustration that I need to reach out.

Firstly, love wappler, it’s outstanding and if I can get my little frustratiion figured it will transform what I do!

I’ve spend way too many hours now trying to figure out getting a remote DB working. I am sure I am being super dumb and missing something obvious so please point me in the right direction, I’ve trawled the docs, but whatever I try doesn’t work on the live site.

Set up is:

Docker deployment - NodeJS - MariaDB
Digital Ocean hosting no managed database, though tried that too!
Dev and production setups created in targets. with default mariadb settings for both.

Created tables in dev on wappler and built all crud - everything works tickety-boo locally.
Deployed to remote and no crud - form data not saving and hence not retrieving etc.

Am I wrong to expect Docker to have set up the db and tables on Digital Ocean and the connection just magically happening via the wappler production target settings?

I’m using the latest beta 5 wappler. I did also try a managed digital ocean db and adding connection details using CA cert in global DB connection properties, but no luck with that either.

I’m an old hand php coder, wanting to move to Node with this killer dev tool - but this remote DB understanding/getting working, is killing me.

If anyone can simply walk me through how to get this working I’d be super appreciative.

As said, I am sure I’m being dumb and missing the obvious, but thank you!

Hey there. Welcome.

Well, if you mean will it setup the tables in a digital ocean database then actually yes, that assumption is wrong. If you setup your digital ocean target in Wappler with database settings, that database will be inside your docker container and not be interacting at all with any database you have setup at DO.

My suggestion for you at least until you have more experience with this. Would be to not setup any database at DO and simply create a remote docker target and include settings for your desired database. That way the connection settings will all be managed by Wappler.

Thank you for the fast response. I thought though that’s, what I’d done.

I removed managed DB in DO and then setup a new remote prod target in wappler, using DO api key and Wapplers default MariaDB settings.

Deploying to prod, I can see in wappler terminal, Docker has created and served prod web and db, but running the app remotely the form/db scripts (simple save form data, close modal and refresh table to display saved data) that works in local doesn’t on remote.

I’m kinda used to phpadmin to be able to check stuff and the docker/wappler black box leaving me scratching my head, lol!

It’s got to be obvious, right!?

A couple things.

First, in the db manager you need to apply recent changes in order for the db schema to be created/modified in production.

If that doesn’t fix, then make sure debug is on (you can search the forum on how) and check the dev console for errors.

You can manually log into your remote do database using the same credentials as your local settings but using to IP address of your DO droplet. Very simple.

Thank you gentlemen, super helpful!

Found the issue, as per earlier comment @mebeingken the tables aren’t created on remote DB, which I had initially presumed Wappler DB manager + docker would do.

So at least the issue is found, now to figure the fix!

“status”: “500”,
“code”: “ER_NO_SUCH_TABLE”,
“message”: “select id, firstName, lastName, email, cellPhone from users - ER_NO_SUCH_TABLE: Table ‘.users’ doesn’t exist”

Sorted - thank you both for the pointers. Created project without db, which unlocked remote connection. DO details in there and all hooks up perfectly.