DEV Community

Alejandro Bonilla
Alejandro Bonilla

Posted on

docker+node+vue+apache

Hi Dev's

I have 1 physical server with Centos 6. This a old server, with a lot services for my office, and now goes to migrating at new technologies. (Vue and node)

The cuestion...

Its a great idea dockerizer the Website of my business?

I need dockerizer vue+node on same container, or one container for vue frontend and other for node backend container?

PD: I learning docker ... and English xD

Top comments (7)

Collapse
 
vonheikemen profile image
Heiker

I had to do something similar a couple of months ago, but it wasn't a vue website. I used a container for the website and another for the backend.

The way that I did it was using docker's multi-stage builds for the website. And used docker-compose to start both services, the backend and frontend.

You could take a look at this example that is in vue's documentation. That should give you an idea on how to start.

Collapse
 
ab0nilla profile image
Alejandro Bonilla

thanks Heiker
your answers are always useful

Collapse
 
thomasjunkos profile image
Thomas Junkツ

No. I see no business reason to do this.
If you want to do it for fun and profit - go on!

Collapse
 
ab0nilla profile image
Alejandro Bonilla

Hi Thomas, the principal reason for migrate to containers: update and upgrade.

I have servers for financial companies, now I have new services with e-financial with android apps, java, and microservices.

The server need best modular practices, migrate to new languages and more easy maintenance

Collapse
 
thomasjunkos profile image
Thomas Junkツ • Edited

It is hard to say anything useful without knowing your infrastructure.

Being asked, whether it makes sense to dockerize a "website"

Its a great idea dockerizer the Website of my business?

I see no reason.

principal reason for migrate to containers: update and upgrade

This rings my "automation-answer" bell.

But as I said - without knowing your infrastructure and software it is hard ;)

Not that docker is not a good solution for some problems.
But I would not see it as a first solution for every problem.

Collapse
 
sandris profile image
sandris-

main idea of docker is one service per container.

I would go with node for backend in docker and setup frontend hosting on netlify.com

Collapse
 
ab0nilla profile image
Alejandro Bonilla • Edited

ok ok, 1 container per service