Docker Best Practice

I am planning to create a docker configuration, it will be implemented in an empty VPS.

The idea is to cover all process, including generating SSL certificate using letsencrypt, until serving the MERN application.

What is the best practice for this?

Do we need to create 1 docker compose file, it will cover all process?

Or we need to split the process into 2, one for generating the SSL certificate and the other for serving the application?

Or is there a better way?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi there @budiantoip,

I believe that it would be more convenient for you to have 1 Docker Compose Yaml file which would do all of the set up for you.

That way if you need to move your application to another Droplet, you will be able to only run that 1 docker-compose up command and your environment would be up and running.

Regards, Bobby

I see, great, thanks @bobbyiliev

This comment has been deleted