Okay, so I need some quidance to getting things to work with Digital Ocean and linked to a mysql db.
don’t know where to start because I have been going through all documentation but there are still parts missing imho.
Let me explain what I did managed to get wroking;
create a DO target with a docker machine.
created a droplet on DO and managed to get the static part working with https This is all using the documentation Now the next part is to get the local mySQL database running in Digital Ocean and connect it to the website
So I created a database cluster and database at my DO account Using a RazorSQL I exported my local database and created the same database in the DO database cluster.
Back to Wappler, Do I need to use these credentials in my Digital Ocean Target in Wappler? I tried that, but get a 500 error in the network status on the live site.
I also tried using the connection string from DO in the db ‘connection options’ Downloaded the certificate and placed it in the app folder After a redeploy I am getting this error:
{
status: “500”,
message: “Cannot read property ‘ssl’ of undefined”,
stack: “TypeError: Cannot read property ‘ssl’ of undefined at App.setDbConnection (/opt/node_app/lib/core/app.js:250:37) at App.getDbConnection (/opt/node_app/lib/core/app.js:282:25) at new DatabaseProvider (/opt/node_app/lib/auth/database.js:9:23) at App.setAuthProvider (/opt/node_app/lib/core/app.js:173:26) at App.getAuthProvider (/opt/node_app/lib/core/app.js:190:31) at App.identify (/opt/node_app/lib/modules/auth.js:10:37) at App._exec (/opt/node_app/lib/core/app.js:449:57) at App.exec (/opt/node_app/lib/core/app.js:389:20) at App.define (/opt/node_app/lib/core/app.js:376:24)”}
When I restart Wappler, some of the database connection: db settings have reverted back??
Host is reverted to “db”
the port is back at 3306
and ssl is turned off
Could it be that this has something to do with my problem not able to establish a connection?
The database Manager is also not able to connect to the remote database server (ECONNREFUSED)
Ok, I am trying again with a new clean docker machine. I removed the old target and added a new docker machine via Wappler.
As soon as I save the target I get the following error in the terminal:
thanks George,
I don’t want a managed database. I didn’t realise that the mySQL is also working in the droplet.
Finally I managed go get things working.
One thing to ‘Wapp my head around’ is how to manage the remote database within Wappler.
After the first deploy a default table setup is created in the droplet.
Then in Wappler you can use the Database Manager and apply each step from the ‘changes’ folder.
Thing was that not all changes could be applied so I had to use an external sql editor to update the database in the dropet to match the local one.
So the workflow from now on will be as follows:
make changes locally and deploy locally for testing
if all ok, switch to the remote target and deploy
In the Database Manager apply each changed step to match the local db