Ftp to Docker hosting

So we now have a method of conversion between asp, asp.net, php and node.

Anyone found a simple way to convert an FTP based project to Docker or reverse without reverting to just copying files over?

Well there is not much to convert when just changing the publishing target in the project options. So just edit the target options and instead of the FTP choose now choose docker as target and enter the desired options. On save all required settings will be generated.

If you do plan to use a vps server as docker target, created with the resource manager, it is of course required to create it first and then use it in the project options docker target.

So a local development environment based on Wappler own server can publish to a docker container without changes?
I assumed the dev settings would also need to be changed to docker local and if so is all that is needed?

Hi Brian,

To switch from using your own server (publishing via FTP) to deploying to a Docker container, you’ll need to adjust these settings. These changes will affect all the targets you’ve set up in your project.

  1. Server Type: Docker
  2. Connection: Local for local deployment; Remote for instances hosted remotely
  3. If you select Connection type as Remote, you’ll also need to define Docker Remote settings by choosing Cloud Providers and Cloud Server.
  4. Database Type: Docker for locally deployed databases; Cloud Database if the database is on a remote server

If you plan to use both Cloud Server and Cloud Database, make sure to set them up beforehand so you can select them in the target options.

I haven’t personally tried switching between different server types, so I’m not sure if these changes will work seamlessly throughout the project’s configuration settings.

I am planning a new video series, probably ecommerce based

I usually opt for the vps/ftp route because docker has thrown up so many issues for me over the years.
But i am aware many favour docker deployment and want to feature that process if possible without having to run two projects in parallel.

I recommend maintaining the two projects as separate. The configuration requirements are significantly different for each deployment method and switching between them could break the project deployment workflow.

Duplicating everything means making the tutorial twice, thats not a practical option.
When i get home (currently holidaying in Cyprus) i will see is it can come up with a solution.

I would still recommend maintaining separate projects for the two deployment methods.

Docker deployment has more configuration requirements than an FTP and as such the Docker project can incoprorate only a few elements of the project with FTP deployment. Even if the transition from one deployment method to another appears straightforward, it is still preferable to demonstrate Docker deployment configuration independently.

This will also ensure that users who wish to use Docker have a clear understanding of the configuration requirements rather than attempting to switch between two deployment methodologies midway through the project development cycle.

These are my personal opinions based on my experience running deployments with both methods in the early stages of my Wappler journey.

I am happy to share information on Docker deployments if it is helpful in making the videos.

I also recently mastered vps/docker deploy, I don't like the fact that wappler sets up the firewall policy itself and manages ports on the vps. If you have multiple containers, it will disrupt their operation.
In this regard, in my opinion, it is also interesting to consider CI/CD with Git Providers, for example, with Coolify.

Could you please provide a bit more information about how Wappler manages firewall policies when you have multiple containers? I run multiple projects on the same VPS and haven’t had any firewall problems accessing them from the web.

I’ve had the same experience as @Cheese when I run a system check in Resources Manager on a new server - the UFW status is set to inactive by default.

I saw you mentioned this issue, which is why I wanted to know more about it.

I think you misunderstand what I am asking and this is going off track. I dont want to feature switching as part of a tutorial so i will rephrase the question into a practical scenario for better context.

Say "I have a large project build on ftp type deployment. My customer now wants me to deploy via docker. What is the easiest way to convert the project to run in a docker container

I have used docker many times in the past and have made tutorials so am familiar with the technogy, just wondered if anyone had a simple and reliable way of switching between the technologies other than simply copying pages/apis/routes etc over to a separate project

2 Likes

Add a new Target and set the Server Type to Docker. Then hit the Publish button and select the new Target? I'd assume that is the way to do it..?

EDIT:
@Hyperbytes you'll want to check out the Docker threads here and here as remote deployment could be an issue.

To be honest @Cheese, there always serms to be at least one issue with docker ongoing,thats why i avoid it.
Never have any issues with ftp!
I view it as the technology which simply adds an an addional level of unnecessary complication with constant issues and bugs.

Pressing "publish" is just as easy as pressing "deploy" but it is 100% reliable

Docker is great and allows us to ship containers pre-configured in full and ready to run. We don't mess around setting up PHP versions, proxies, firewalls and all that malarky with Docker. We do it once and once only. What we ship to the Client is a fully functioning webserver that they can deploy in minutes. I don't understand:

Aside from the issue with versions which is not actually a Docker bug then there is no complication, constant issues, or bugs. I can spin up 50 pre-configured Containers in the time it takes me to set-up hosting to the level we expect if we were ever put in the position to go back to PHP etc.

Horses for courses Brian. Just like with PHP deployments you don't have to use Wappler as your deployment pipeline. Just create your own if needs be.

Going back to PHP feels like hand washing your clothes when you have a perfectly fine washing machine. Or going in to the garden to build a fire to cook your dinner on when you have an oven and microwave in the kitchen...

:laughing:

2 Likes

I’ve been deploying web applications with Docker for the past five to six years and have rarely encountered issues.

As Cheese mentioned in his earlier post, the current deployment problem isn’t caused by a Docker bug. It’s a compatibility problem between Wappler and Redis with the changes introduced in Docker Engine 29.x.x, specifically affecting internal DNS resolution that the web server depends on.

1 Like

Not sure where PHP entered the debate, not done a PHP site for about 5 years.
I just spin up a vps (or add a site to an existing one), activate node and deploy. Not really that different a process really.
As to who's fault the problem is, thats not the issue, there is still a problem.

My bad. Just an example of spending time configuring servers when with Docker that is out the window.

Hahahaha that goes for just about all things developer related!

'fix it all and don't make mistakes'

:shushing_face: