Error deploying with Docker

The screen shot above is on ‘test connection’

You need multiple targets. The first target is always your local machine that is typically connected to your local components (local web server, local database, etc.). The other targets are usually to remote machines on cloud providers.

Can you provide a screenshot of the Development target? It should look something like this.

@kfawcett

Well that explains a lot… thanks.

I actually destroyed my DO droplet and am rebuilding. Will add the two targets as you say and reply again with screen shot.

Seems like this may be the culprit, and I sincerely do appreciate you taking the time to help.

I’ll get up to speed… :slight_smile:

Same problem - refusing to connect - which is a different error than what I started this thread with.

Here are the targets:

And…

Thoughts?

~Elle

Your Development target works fine? It’s just the DO_Cloud that you’re having issues testing the connection?

I also get the “Error Occurred Testing Docker Connection” when using the “Test Connection” button. I’m guessing it’s a bug.

If you go to Resource Manager and right-click on your server and click System Check do you get a “Server was setup successfully!” message?

image

image

There’s a big problem here, this Docker method you’re using is obsolete, what tutorial are you following?

The new Docker method uses the new Resource Manager and SSH connection instead of Docker-Machine

This is the tutorial you should follow:

Alternatively, here’s a video tutorial as well:

Thank you, @Apple. I’ll have a look now.

~Elle

@Elle you’re already using Resource Manager? It seems like you are based on the Use Cloud Server value.

image

If you are then, if you go to Resource Manager and right-click on your server and click System Check do you get a “Server was setup successfully!” message?

image
image

@Apple Yes. This tutorial is how I set it up.

~Elle

@kfawcett

Thank you for this.

Yes, it is in resource manager:

image

Right click server —> system check output:

image

Which is contradicting what comes next…

On Project Settings I set two different targets as you suggested.

Development is ok:

However, DO is not:

However, take notice (I just did) that the Docker Deploy Name prefix is poie3_

I have made numerous tests (attempts) and my Docker Desktop is littered with each of them.

Intriguing here is that the only running container prefix is poie1_ - a previous test attempt.

Odd, because Docker appears to have created each container as I created the new project in Wappler, yet, it appears, for some reason that did not happen at this new projects creation.

So this is likely the problem?

So I attempt to change the Docker deploy and and the drop down is not populated:

Ugh. I think I’ll start over with a new project.

As always, I appreciate your willingness to help.

~Elle

@Elle let’s see if we can deploy your Development setup to the cloud.

  1. Click the Publish button
  2. Change the Publish To dropdown to your cloud instance (DO_cloud).
    image
  3. Select Clear Unused Docker Images. If you don’t select this you will eventually run out of space as you upload newer images.
  4. If you have Database Changes to apply, then select Apply Database Changes
  5. If you want to commit to Git as the same time, then select Commit to Git and add a message.
  6. Click Publish

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

@kfawcett

That… didn’t go well.

Odd, because I saw this message yesterday, but don’t recall in what context.

Thoughts?

~Elle

Are you doing a lot of deleting and restarting trying to get everything to work?

@kfawcett

Guilty.

@kfawcett

I’m thinking my best bet is to start (yet another) project from scratch.

Take it from the top.

~Elle

ok, let’s start from the beginning becuase I also noticed in your most recent screenshot of your Development target that you appear to be using a local web server and do not have a database defined.

So, first question. Do you have a preference of using PHP or node.js? If not, I recommend node.js.

Let me know which and I’ll provide next steps.

@kfawcett

Def nodejs

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.