Front end Web development with self contained images via virtual machines

Hi Vitor,

I do “wordpress front end Web development”.
This reply caught my attention.

By self contained images via virtual machines what would you go for; for this purpose.
Docker, kubernetes, KVM or another solution?
What you advise?

I am not Vitor but I do development.

Each and every project is different - so it is impossible to promote one approach over another - because requirements are different.

The first thing to consider is a sane, clean and stable environment - your Manjaro workstation will never provide the stable and clean environment.

On a scale from 1 to 5 where 1 is the easiest - I’d give a Virtualbox VM one star. Any one can setup a lamp stack using an Ubuntu VM - while Arch based distributions has a complety different naming for folders, services and service accounts.

Every other container has a learning curve depending on your previous experience level and the complexity of your project - e.g. doing both client and server (api) often requires one or more instances.

In fact - the best thing you can do is to start slowly and find your own path because there’s no better knowledgde than knowledge from hard work and learning by doing.

for me, only way : docker-compose (especially for python/php)

note: it is not mandatory to put all the source code in our container: it is possible to mount the source directory of our manjaro to the container (bind volume). best for dev, but not for deployment. Read doc, nothing is too complicated.

      - wp_data:/var/www/html

/var/www/html is in my manjaro
or, I can use a relative path (from my docke-compose file) : - wp_data:../myproject/www

Docker would be the best way. However, ask your customer first where they are planning to deploy.

Docker and similar are not independent virtual machines.

Doing all Development in a Virtualbox VM sounds counter intuitive. Don’t you agree?
As much as i love manjaro, isn’t it better to use Ubuntu, Debian Stable or Slackware, and do most development natively?
Of this 3 distros which one would you advise for the purpose?
After reading I’m inclined for Debian Stable. Slackware is rock solid stable, but falls behind in package management etc.
I will try all 3 in Virtualbox anyway.

Completely agree.

Understood docker products once developed have to be deployed in docker, for the client.
I am in the process of learning docker/kubernetes.
Please ready reply to @linux-aarhus and let me know between Ubuntu, Debian Stable and Slackware which one would you choose for front end web development?
What is your experience with these?

NOTHING :rofl:
If you use docker/VM, the host is not important

No,the problem is to pollute its own distribution and,
Depending on the deployment server, I need different versions (not necessarily available on my distribution)
with docker/VM, i use same versions as the real serveur and, (with docker) I can anticipate a future version

??? nothing, server is the back end :wink: we can play with react without server

I am a beginner with Docker.
Personally for my own wordpress website i am developing. Natively i use FTP, browser, and text editor.
And i prefer this way, then using Docker or VM. Isn’t it better?

What did linux-aarhus mean with this?
I am front end wordpress developer.
So from what he said, NATIVELY it does not matter if i keep using manjaro or move to Ubuntu?
I can’t be wasting time :melting_face:

Yes, i understood with docker/VM i can test as much as i want without messing too much with the native OS, which is good. But isn’t native development in the case of WordPress (better, natively)?

NO !!!
With docker, we use NATIVELY the same server as deployment server !
This is not possible with our own distribution (manjaro,debian,ubuntu,… same problem) some time you want ubuntu+php7.2, ubuntu+php8, debian+php7.2, …

If i install in my own distribution, i can’t install php+apache+nginx+php7.2 + php7.1+php8 + old version for Node.js etc…
For WordPress (lamp), docker is the best for code as a pro

Note: here, this manjaro forum run (not only for dev) in docker container, blog in another container, manjaro gitlab in another, another …

And if you code only front end , server is not important : only the wordpress version is important :wink:

1 Like

That is not completely true. If you really really want, you can do this. Even with Manjaro, but it is a little bit easier with a Debian or rhel based distribution. But just because it is possible, it doesn’t really make sense to do this, I agree with @papajoke . I just want to point out that this can be done, but of corese it is the same base system, so no ubuntu+php7.2, ubuntu+php8, rhel+php7.2.

Personally, I would use what works for me. If for @U174 a text editor is enough, so set up a local VM, similar to the production system, configure ftp and upload the WordPress theme/plugin/… via ftp. This can work, it is not modern, but how cares. It needs to work for you.

Got it. That’s what i wanted to clear. It does not matter whether i use manjaro or ubuntu for web development (with docker and virtualization software).
Both distros are excellent for this purpose anyway!
I’m going to do a full linux install on my ssd. No dual boot! And i’ve been contemplating going from manjaro to debian stable or ubuntu. That’s why i was looking forward for your replies.

The clean and modern way to use mixed combos with different technologies and php versions, is to use docker containers and VM’s. Doing so NATIVELY messes things up and is difficult to manage. As @xabbu also pointed.

I feel tempted installing debian for it’s stability, or ubuntu for better packages management than debian.
But i just love manjaro, and the way plasma looks and feels.

With WordPress live development which i do via browser, and access the hosting server via FTP, and edit the files locally with a text editor before saving them; it works just fine!

I am learning docker for developing JavaScript, as it’s a requirement by a company. Plus i will use it for other stuff as it’s widely used.
I just wanted to make sure manjaro, like a debian based distro (handles containerization and all kinds of virtualization software). Without issues and compromising it’s stability.

That’s really what i needed cleared as the thread evolved :slightly_smiling_face:

I didn’t say all - what I mean is that especially server side development will require a separation which can be achieved using your desktop for client and ta virtual machine for the server.

For my main project - I have one physical staging server running Wndows 2019 for the server side API and development database - and a virtual machine running Windows 2019 for testing the API - and a virtual Windows 10 with Visual Studio for the backend API and last but not the least my workstation where my client side is done in C# using Jetbrains Rider.

I sense you are relatively new to development so taking your example with Wordpress on PHP - I would create a virtual machine with Ubuntu and Apache, Mysql and PHP.

I would share the client folder from the virtual machine to be able to work realtime with the PHP content and use PHPStorm as my code editor.

I only do front end web development with CMS’s as WordPress. Using Html, CSS and JavaScript. Nothing else for now :slight_smile:
If i see a need for this to use a VM, for sure i will!

Got it!
But doesn’t xampp do all of this locally?

Currently i do live development directly through the browser using the WordPress theme editor and with ftp to server to edit files with an editor.

Locally i did it with xampp. Maybe not the most professional way, but it worked :slight_smile:

So how do you test it on Edge? Or (IE levels) worse, Safari.

You can achieve your goal in a lot of different ways - but if you try to run it all on the same box - you will regret it - at one point or another.

We are all different - so there is no one-stop solution - there is easy answers - there is only your workflow - how you work and unless you work with a team - you are free to create your own setup - no one tell you how you should flow your work.

I have regretted a lot of working setups in my developer years. It was only when I splitted the conserns up into virtual machines. The splitting of development tasks and the use of github and bitbucket made my life a lot easier.

System setups doesn’t keep running smoothly - especially not when you mix a variety of tasks like webserver and development environments - and your downtime when that happens is far greater than you can ever imagine.

I have tried weeks of downtime back in the glory days of my oneman self-employed octopus life.

I learned the hardway to use virtual machines for important systems - systems which I could not afford any downtime on - systems of which I creates a copy every now and then so when an update breaks my flow I can get back on track in the matter of an hour tops two.

Docker and containers like it requires more setup time than importing a virtualbox ova file.

1 Like