Error deploying with Docker

@kfawcett

I have been exposed to this stuff for (way too many) decades using over 15 - maybe 20+(?) languages.

Never has “Hello world” taken more than a few minutes. Ever.

Trying hard to not feel frustrated.

As always, I sincerely appreciate your time and efforts in helping me.

~Elle

Most of the time, no. But Wappler is combining a lot of complex tech together and bugs are encountered sometimes. Just need to figure out if it’s Wappler-related or something outside of Wappler like the version of Docker Desktop or OS that you’re running.

@kfawcett

Agreed. But that’s part of the beauty of it, no?

I feel like it will be worth it in the end to have the assistance of Wappler doing the heavy lifting.

I will persist in trying.

Thanks again.

~Elle

It’s definitely is worth it! You will encounter hurdles along the way, but you’re getting pretty advanced tech that you can run on your own without being locked into a platform like Bubble.

Fortunately, you can continue to build in your local target until we figure out what’s keeping you from deploying to cloud target.

Maybe @Teodor or @George have an idea the build error you’re receiving.

One option we could try in the meantime is fully exiting Wappler and restarting it. If you’re on Windows that means going to the taskbar and right clicking on Wappler to quit or restart.
image

For what it is worth, always found the idea of docker great but the reality frustrating.
I use docker occasionally but for my day to day stuff I use a shared platform for PHP and a VPS for node and stick with old fashioned but reliable and predictable FTP.

1 Like

Have you viewed my videos which @Apple shared. They talk you through the entire process

https://youtube.com/playlist?list=PLUjqTJN3byC_KhuPg-vSqD6fgAzC0dBJz

I use Docker for all types of projects and find it really helpful in the simple areas like moving changes in Wappler or the more complex of scaling up and/or migrating components in larger projects. It is very much worth learning and using.

1 Like

Quick question have you enabled the Digital Ocean firewall by any chance?

@kfawcett

Thank you for the encouragement.

Have restarted, yes.

I have jokingly told friends and family “If I’m ever on life support and stop breathing, power cycle the vent… see if that helps…”

And on Docker Desktop I have noted that the digOcn was created, but not started. When I press start, I am faced with a port already in use error.

Is both the dev and dig ocn supposed to be running in Desktop? Sorry if it sounds like a basic question - but I really don’t know - I’ve never had a need for Docker in the past.

~Elle

@Cheese

I have not.

~Elle

Docker Desktop is only for local instances (i.e. the Development target).

1 Like

@Hyperbytes

I have not. But I did look at the link he made just above it.

I’ll have a look at the vid, thanks so much!

~Elle

First 2 videos cover local development target, deploy to digital ocean, adding a domain name and adding SSL certificates

1 Like

Let me know if you want to setup a Zoom screen share. Might be easier to walk you through setup.

2 Likes

I asked about the firewall as DO is quite specific about its ports to use. Maybe a local firewall is interfering? What OS are you using? We’ve never had any issues with Docker and Wappler, nor Docker and Digital Ocean, just to clarify. Its easy to bash them but its usually configuration related and not the services or tools themselves.

What happens if you simply hit Deploy instead of Publish?

I’d highly recommend destroying/deleting all those waste containers and starting afresh. Clear out the trash so to speak.

2 Likes

Also double check your I.P in Digital Ocean and make sure it matches that set in your remote target! It can change especially if you have recreated Droplets and you neglected to update the I.P within Wappler itself.

@Cheese

Same thing:

Hi Elle,

It seems that your Wappler settings are all fine but you have a docker installation or configuration error.

What OS are you on and is the docker desktop all running fine? What version are you on?

Check also the docker options there might be some options there about using the so called buildkit that you might want to disable, see if that helps.

The best way to test is indeed just doing a deploy.

1 Like

@George

Thank you for the response.

I’m running Windows 10 pro with the latest Docker Desktop with updates applied.

After looking on how to d/a buildkit, I ended up at the Docker CLI. Which also makes the run logs available. Here is log output:

2023-08-15 03:53:16 [nodemon] 2.0.22
2023-08-15 03:53:16 [nodemon] to restart at any time, enter rs
2023-08-15 03:53:16 [nodemon] watching path(s): app lib views extensions tmp/**/restart.txt
2023-08-15 03:53:16 [nodemon] watching extensions: ejs,js,json
2023-08-15 03:53:16 [nodemon] starting node ./index.js
2023-08-15 03:53:16 [nodemon] app crashed - waiting for file changes before starting…
2023-08-15 03:53:16 node:internal/modules/cjs/loader:1031
2023-08-15 03:53:16 throw err;
2023-08-15 03:53:16 ^
2023-08-15 03:53:16
2023-08-15 03:53:16 Error: Cannot find module ‘./lib/server’
2023-08-15 03:53:16 Require stack:
2023-08-15 03:53:16 - /opt/node_app/index.js
2023-08-15 03:53:16 at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
2023-08-15 03:53:16 at Function.Module._load (node:internal/modules/cjs/loader:873:27)
2023-08-15 03:53:16 at Module.require (node:internal/modules/cjs/loader:1100:19)
2023-08-15 03:53:16 at require (node:internal/modules/cjs/helpers:119:18)
2023-08-15 03:53:16 at Object. (/opt/node_app/index.js:1:16)
2023-08-15 03:53:16 at Module._compile (node:internal/modules/cjs/loader:1198:14)
2023-08-15 03:53:16 at Object.Module._extensions…js (node:internal/modules/cjs/loader:1252:10)
2023-08-15 03:53:16 at Module.load (node:internal/modules/cjs/loader:1076:32)
2023-08-15 03:53:16 at Function.Module._load (node:internal/modules/cjs/loader:911:12)
2023-08-15 03:53:16 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
2023-08-15 03:53:16 code: ‘MODULE_NOT_FOUND’,
2023-08-15 03:53:16 requireStack: [ ‘/opt/node_app/index.js’ ]
2023-08-15 03:53:16 }

Interesting is 2023-08-15 03:53:16 Error: Cannot find module ‘./lib/server’

Which also doesn’t make sense because of this:

image

Do you see any clues here?

~Elle

@George

…and this?

~Elle