Error deploying with Docker

Great, create a new web project and select Docker as Development Environment and NodeJs as Server Model.

@kfawcett

Done. Got the green flag ‘all services started’

And it appears in Docker Desktop


~~Elle

Great. Next steps.

  1. Go to Site Manager and open the index.ejs file
  2. Add a paragraph with some text and save the file.
  3. Go to Resource Manager and create a new Provider. Don’t select the cheapest option as that doesn’t have enough resources to run docker. Go with the $7+ options.
    image
    image
  4. Set up the new server as a Target in Project Settings
  5. Click the Publish button

  1. Change the Publish To dropdown to your cloud instance (DO_cloud).
    image
  2. Select Clear Unused Docker Images . If you don’t select this you will eventually run out of space as you upload newer images.
  3. If you have Database Changes to apply, then select Apply Database Changes
  4. If you want to commit to Git as the same time, then select Commit to Git and add a message.
  5. Click Publish
  6. If the publishing was successful, then you should be able to go to the IP address of your cloud instance and see your index page with the text we added.

If you’ve expanded the bottom panel, then you should see Wappler starting to build the remote instance.

At some point, go to DigitalOcean and ensure you don’t have a bunch of droplets that you’re not using.

@kfawcett

While the server is provisioning, for clarity I should ask:

This is setting up two targets in settings as you mentioned before, correct?

~Elle

@kfawcett

Sorry. I guess that sounds like it was from the “Stupid Questions Department”

Yes, you should have an existing “Development” target that is setup for you. The second one will be for the Cloud Server. I cannot recall if that is automatically setup when you create a server in Resource Manger, if it’s not then please add it. You’ll need it for Step 6 in the instructions above.

Just a fyi this error is normally caused by deleting database changes without properly reverting them or if they was still remaining in a backup etc normally you don’t want to delete change files

1 Like

@kfawcett

Thank you for that tip.

You have not directed me to add any db so…

Yet, however, when attempting to add cloud target, I am confronted with the same at ‘test connection’:

Ugh.

~Elle

There’s a possibility that test Docker connection might be using the old method, and therefore always failing even if you did everything right. Better to test by doing a real deployment attempt

Wappler team needs to clean that up when they get from their vacation :stuck_out_tongue:

1 Like

@Apple. Something I reported a while ago. Docker endpoint for "default" not found when trying to deploy to remote server

@Elle, let’s ignore that error for now. See if you can continue with the steps I provided. Also, you can add a DB if you’re going to use one. Make sure you set it up in the Development target first and I would make sure it’s in Docker as well.

@kfawcett

Progress… I guess?

The index Hello World launches locally.

When deployed to DO, not so much…

In project settings:

Web set to port 80 - not 443.

Despite this, the page load attempts to load https://ip

When I remove the ‘s’ it still attempts to load with it.

Feels like progress… so close but so far away. :slight_smile:

Did you publish to digital ocean?

Remove the port number completely, its not necessary as 80 is a default.

@kfawcett

Yes, to DO.

I removed the port. And while it no longer attempts to load in https:

And on ping:

When you published to the remote instance did you get an output like this?

@kfawcett

Yes. Exception db changes, due I have not added any db

~Elle

That looks like you published to the Development target (I don’t know why Wappler even allows this), not the cloud target. Did you change the value in the dropdown of the Publish modal to the name of the remote target?

image

@kfawcett

Published to digocn:

~Elle

:slight_smile: The target is only to allow you to access certain areas of the target, within the editor (DB manager, App settings, etc.). I know. It’s confusing.

That doesn’t mean you’re publishing to the remote target if you use the Publish button.

Please click on the Publish button and select the remote instance (poie_4__digocn) in the Publish To drop down.
image

image

image

@kfawcett

Right. Good catch.

My first post yesterday that you also replied to began with me introducing myself and going on about how Wappler seems intuitive. I would like to retract that… lol

After making that what-should-have-been obvious change, after sending publish to remote, I was confronted with this:

Can it really be this difficult just to set up?

~Elle

1 Like