Sorry tor the long intro here - as I’ve read many others who have dealt with this - my sanity needs to share.
Been a week of beating my forehead on the wall - reading/watching tutorials - all to this point:
If you know how to ask the questions - this community has the answers - a wonderful resource
Thank you to so many for sharing your insights - Caprover setup; Node.js on CPanel; new Youtube series on setting up Node.js/SQLite
I’ve learned - haven’t produced a new page in a week - but I’ve setup plenty of “containers”
I wonder how frustrated the Wappler team gets reading some of these posts. As a former tech support/trainer - I remember as a client to send me a copy of the file - he put the floppy disk on the Xerox machine and mailed it to me.
I’ve setup a Digital Ocean account, pushed a Docker container, and can even see the page.
I’ve even gotten Navicat connected to the local Docker container.
I’m going to post my questions individually so not to mix up the topics. Thanks again to everyone with your sharing of ideas and training.
And a week later - what a mess - Still trying to understand the Docker/Spaces world. Learned there’s a traefik option - met to learn that this week, but I can’t get images to upload to Spaces, so I may be headed back to PHP land. Two weeks stumbling through this has almost got me beat. Ben’s videos have been great, there’s so many holes in the stepping stones though, looking like NodeJS will win this battle.
I suppose it depends how much you complicate it yourself, and in saying that I suppose it really depends on your end goal and needs.
To simplify this to anyone reading.
Here are the different routes you can take
Get a Domain Name through a domain registrar of your choice
Get a shared linux hosting account through the hosting provider of your choice
If you want a standard PHP, MySQL type site
Open cPanel, create a database
In cPanel create a FTP user unless one is already created for you that you want to use.
Open Wappler, create new PHP project, connect things in the simplest way first, and if successful then start upscaling, in other words, start by trying to connect to your FTP, but in the simplest way, no SSL certificates etc. Once working if you need add the SSL type stuff, etc.
Connect to your database
Start your job.
Advantages of this are cPanel has a nice little File Manager, it has phpMyAdmin if needed, it has IP blacklisting/whitelisting, you can generally have a simple SSL certificate on the sit for free, you can control your .htaccess file simply and add redirects in cPanel, you can easily see the files added to your server, you can upload directly to your server, you can easily look at error logs, you can add cPanel mail accounts as needed, with POP, IMAP, SMTP, and webmail interfaces.
Possible disadvantages, well there are a couple but my biggest one is many shared hosts do not auto support NodeJS if you wanted to switch later. And Slow in general.
Same as above but get a VPS, or private dedicated server and the only real difference is you can control the WHM side behind the cPanel side.
This means you can control PHP versions per site, change certificate providers if desired, add NodeJS support with EasyApache, Switch between Maria DB vs normal MySQL, and many other things too.
No real disadvantages I can think of off hand, you can pretty much control everything and anything you like.
Both the Above setups worked great for years before, the only trouble is the learning curve for cPanel, WHM, and then the local staging accounts setup on your own computer, maybe having to add WAMP, MAMP, LAMP, or the PHP will not parse locally, Configuring local FTP servers etc.
Docker, which is like having all the above and more and more and more in one, my examples will use Digital Ocean because I am more familiar with it.
Get a Domain Name through a domain registrar of you choice, point either a few A records at Digital Ocean or the core NS records which is easier.
Sign up on Digital Ocean for an account, and do nothing more.
Optionally pre download Docker Desktop (You do not have to have an account there at all), pre download LTS version of NodeJS, both Wappler can do on Auto with its Homebrew, so up to you.
First lets deal with local staging environment setup, well you do not need anything, its all done for you. No local servers to install or configure.
If you want WHM/cPanel, then create a Docker Machine with that, and you can use it exactly like you used the shared, VPS, Private Dedicated Server setup, you can have NodeJS enabled through EasyApache, passenger, and PHP all running at the same time.
Add a Docker Machine with only a Database server on it and use a shared database server for all your projects if you want that.
Do the recommended Wappler style NodeJS/Docker configuration
Open Digital Ocean, get an API Token, copy the long number
Open Wappler setup your NodeJS/Docker project
Make sure you local environment is all working
Add a remote docker connection
Manage Docker, paste in your API Token, choose the options and Wappler does it all for you.
Add a database connection, it auto connects to it already.
Full instructions here
Don’t get me wrong there are disadvantages with this too
Such as you need Traefik for SSL, you either need to check logs and files uploaded with SSH into the docker machine, or install portainer for ease. Luckily Wappler makes this very easy so not a big hurdle.
Here are the painful parts you find out as you go, I am talking specifically Docker Machine with NodeJS, MariaDB, Traefik, Portainer, and that all
There is no FTP client to view your remote files easily, so you have to use a standalone FTP client or SSH, if you use a client, your connection needs to be with SSL Certificates, so a slight pain
There is no mail server to speak of, so if you want mail its easier to point off some of your MX records to something like Google For Business.
User Uploads, Docker Machines use Containers / Images / Volumes, each time you deploy the container for Web is overwritten, so User Uploads either need to go into an AWS S3 Bucket, or Docker Spaces OR just a User Uploads Volume, which is the easiest.
In Wappler open your project setting and add a User Uploads Folder, wham, a new Docker Volume is created, that never get overwritten on deploy, point all your User Uploads to that folder path and your issues are over.
You can connect to the user uploads folder via SSH or via a standalone FTP Client.
The log files can be read via Portainer or directly in Wappler now, however scheduled tasks, (the same as cron jobs in cPanel, but for NodeJS) build up huge log files you may need to configure a little different to suit your needs.
Hopefully some of this points you in some kind of direction. I also know there are many other setups too like Plesk, but I am only talking about what is in my comfort zone.
Sounds like we’ve been walking the same path Paul. It appears you’ve overcome the steps I’m battling. Items I’ve come to think of as standard resources on my shared services provider for the last 15 years (SSL/email/FTP/MySQL) were not anticipated as put of a new learning process.
Leaning towards Brad’s decision… Thank you everyone
i dumped docker some time ago. Seemed great until it screwed up. I lost me security credentials via a crash and couldn’t recover them. and got locked out of the site. Customer was not happy!
Could have created a new droplet and redeployed but it destroyed my trust in docker. The only DO product i use now is spaces for images but that is only as i cant be bothered to migrate everything to the VPS and recode all the links
I was looking at the container world as being something simpler to work with. The reality has proven to be quite the opposite. I’m sure the Wappler team gets frustrated with so many newbies without solid knowledge of the languages and development. Thanks for your patience with us.