Go live version

Hi everybody,
I really need help to publish my project live to Linodes
Docker : Nodes / Postgre
I spend hours trying to publish my project live to test it… Never be able to deploy it correctly and connect database.
I tryed the new ressource manager and never connected DB…
What is the best way to do? I 've read every topics here… Is there any clean process to follow anywhere? I’m confused with all solutions, tricks, …
Many thanks

Quite the question without much more information.

Are you trying to install a Wappler application?

I won’t say any more because it would be prematured until you have provided complete details on what you are trying to install.

Also, what is the response in your browser when you go to your domain url?

1 Like

Hi @NewMedia,
Thanks for your answer.
I worked since several months to build a new version of our App.
This is a Web app + Mobile for task management.
Docker : Nodes / Postgresql
I’m actually finishing the Web App Part and just want to publish it on a staging + production envs so I can test it further with my partner.
Since the Ressource manager feature I 'm not able anymore to publish it correctly (trying with DO, and Linodes). I’m really confused because it seems to me really simple and basic to deploy the same Dev app (+db) to a remote serveur (DO or Linodes, i don’t really care…)
The most i could achieve was to deploy files and SC but not my DB, having error 500…
Many thanks

Are you saying that you have already installed the Postgresql database in your Linodes Volume and configured it to hold your Database tables?

And then the problem is in accessing that Connection for use by your App that is failing?

Êtes-vous en train de dire que vous avez déjà installé la base de données Postgresql dans votre volume Linodes et que vous l’avez configurée pour contenir vos tables de base de données ?

Et que le problème réside dans l’accès à cette connexion pour l’utilisation par votre application qui échoue ?

I did not installed Linodes DB > I thought the DB was created in my docker container automatically.
Do you mean I first need to create a “Database Clusters”? In that case how to dump my dev DB? How to retrieve my DB in Wappler?
Sorry, there is something i did not understand with the new Deploy/Publish process.
Thanks

I installed databases manually IN the Linodes Container of my account volume first.

I see that the Wappler Tutorial is based on a different platform that I believe has its own proprietary Dockerization.

I have not tested the Wappler Resource Manager with Linodes to see where it varies from the Wappler Tutorial.

One way to install manually, as you probably saw . . .

1 Like

Thanks for your help @NewMedia
I assume that I do not understand how to succeed.
I tried with Linodes but don’t see where to link DB to volumes to get them in Wappler…
I also tried with Digital Ocean following the tutorial steps… everything is ok, created Droplets and DB-cluster… setted up both Dev and Live targets… and finally get the same result ie no DB.
I’m missing something…

Hello dear all,
(Wish you all the west for this new year!)

Spend again few hours (this week-end-yesterday-this morning) trying to deploy our project.
Nodes + Postrgre + Docker.

I tried with BDD included in Docker and also with a Database Cluster (especially created for my test).
and did not succeed.

I tried this morning to publish fresh new projects using the sample DB and listing cars, to Linode > I succeeded publishing trying both MySQL8 and PostgreSQL 11.

I tried then to publish a blank project initializing it with my PostgreSQL Dump (about 140 tables) > Everything works in local but impossible to publish DB in a brand new Socket > Docker > Linode.
I got some DB publishing error:

I wish someone could help me since i spend so many time (days…) trying to find a solution, testing, reading posts…

I imagine my DB is too “big” (too many tables) for Wappler, or Dockers DB.
If Wappler team (@George) could help i’ld appreciate, i’m really stuck and need to publish my project these days.

Many thanks

Hi @NewMedia,
Could you precise me the step by step process you used?
Many thanks

Do you have any database schema changes? Those are listed in the database manager “changes” and will be applied on publish.

Or did you create the whole database from a dump only so no changes were kept in Wappler?

Hi @George,
No database changes - created from a backup dump before my publishing tests

Well that there is nothing to publish as database changes. You will have to manually apply the same database dump to your live database.

Wappler can deploy automatically only database changes performed and recorded as such by the database manager.

2 Likes

Ok, thanks @George - I understand.
This means i should have created my “Production” target at the very beginning of the project and published every changed (using changes history) - just to be sure.

How should I do if I want:

  • to publish the the DB in the Docker container?
    or
  • to publish the dump DB in a database manager? Do I need to “import” the dump (ie. pg_dump)?

Sorry for my rookie’s answer, i’m not very confident with server management.
Thanks again

As another person who reads and learns from threads like these, I am glad you asked! I also had a lot of trouble deploying using the Wappler tools when publishing and this community is a great place to figure it out :slight_smile:

Some points that might help your understanding.

  • Keeping your staging/production targets up to date with the latest schema (not data) is essentially done in one of two ways: 1. By making ALL schema changes using the Wappler DB manager while working on your Development target and then Applying those changes to other targets as part of publishing. OR 2. Use an external database manager (eg. Datagrip, SQL Workbench, Navicat, etc.) to replicate your development db to other servers.
  • To populate a database with data (not schema) you can either 1. Learn how to use Seeds in the Wappler DB manager, or use an external db manager to copy data from some tables in Dev, to tables in staging/prod (assuming they already have the same schema.)
  • Additionally, you can initialize a new database of any target by placing a sql script (such as one created by mysqldump) in the db_init folder of a chosen target. This path to the folder is project_folder/.wappler/target_name/db_init. When you initialize a target for the first time, it will run that script. For a typical mysqlpdump, that would mean creating the schema and populating with its data.
  • Keep in mind that you typically only want to populate the staging/production db’s once, and only make schema changes after that. In other words, keep your dev data separated from staging and production.
  • To have a database inside a docker container, you set that up where you configure each target. Once this is done, you can access it via the Wappler db manager, or an external manager
  • If you want to use a managed db (from DIgital Ocean, or other supported providers) you can create (or import) it from the Wappler resource manager. Once you have that successfully created, you can create a target, that uses a Cloud Database and select the server cluster you created (a cluster can be 1 or more servers, depending on how you configured). Once you add the Cloud Database, save the changes and re-deploy.
5 Likes

@mebeingken thanks for these insights.

Keeping your staging/production targets up to date with the latest schema (not data) is essentially done in one of two ways: 1. By making ALL schema changes using the Wappler DB manager while working on your Development target and then Applying those changes to other targets as part of publishing. OR 2. Use an external database manager (eg. Datagrip, SQL Workbench, Navicat, etc.) to replicate your development db to other servers.

Ok, understood. For the moment I have no production target. But i’ll keep in mind to apply each changes in the future

To populate a database with data (not schema) you can either 1. Learn how to use Seeds in the Wappler DB manager, or use an external db manager to copy data from some tables in Dev, to tables in staging/prod (assuming they already have the same schema.)

I did test with seeds previously and this works perfectly. I’ll took advantage of this tool once in production.

Additionally, you can initialize a new database of any target by placing a sql script (such as one created by mysqldump) in the db_init folder of a chosen target. This path to the folder is project_folder/.wappler/target_name/db_init. When you initialize a target for the first time, it will run that script. For a typical mysqlpdump, that would mean creating the schema and populating with its data.

Here is my problem. I tried this several times… And my DB is not created… get error 500

Keep in mind that you typically only want to populate the staging/production db’s once, and only make schema changes after that. In other words, keep your dev data separated from staging and production.

Thanks for the advice. This is crystal clear for me.

To have a database inside a docker container, you set that up where you configure each target. Once this is done, you can access it via the Wappler db manager, or an external manager

I’ll try agin… any advice for external manager so I can check if my DB is well created?

If you want to use a managed db (from DIgital Ocean, or other supported providers) you can create (or import) it from the Wappler resource manager. Once you have that successfully created, you can create a target, that uses a Cloud Database and select the server cluster you created (a cluster can be 1 or more servers, depending on how you configured). Once you add the Cloud Database, save the changes and re-deploy.

Looks so easy :slight_smile: … I tried and each times my DB seems not created from the “db_init” folder…

Thanks indeed - your answers confirmed what I had understood of the different points before testing.

1 Like

Great, so if you have this all understood, I’d recommend you attempt to do you desired project/targets/db with a very basic database (just a couple tables, with a few columns). See if you can get it all to work, with just the basics, so you can a) confirm it works and b) eliminate your process as part of the problem. When things don’t work well, it is best to scale back and start eliminating possible causes. Also, follow the errors presented.

Then if it fails with your actual db, you can post a very specific request for help with that one specific issue. Right now, this thread goes in many directions(mysql, postgres, docker, cloud db, etc.), which makes it very difficult to help. Stick to one specific problem and post more details and screenshots of the relevant configurations, steps you are taking, and output you are seeing.

Confirm this script works outside of wappler, so you can eliminate that as an issue. If it works outside of wappler, and a very basic script works inside wappler, then post here in the forum that specific issue.

I use Datagrip, but the ones I mentioned (and others) are all fine.

1 Like

I have been in this (frustrating) place… and while there can be many causes, here are two threads that helped me through the weeds with similar “my db isn’t being created” issues:

and

Since you’re also using Postgres, I’d suggest also considering pgAdmin

It’s included in the prebuilt downloads here if you don’t already have it: PostgreSQL: Downloads

DataGrip offers some great features, but if you’re just using it to check Wappler’s work … the database diagramming tool in pgAdmin is awesome for that, and pgAdmin is delightfully free! ERD Tool — pgAdmin 4 8.6 documentation

1 Like

Dear all,
Thanks for your kind answers and advices.
I just retried step by step and found my mistake.

Docker + Nodes + Posgresql
Deploying to Linode Socket
Just created a new “Production” target linked to a brand new Linode Socket
Just seted up the host field in “Production” target with “localhost” instead of leaving it blank.

Try, fail, stand up, try again, fail, publish it up
Such an happy day!!!

I’ll post the project in few weeks into the showcase categorie.

Thanks again!!!

4 Likes