D
D
Denis2019-01-17 09:25:10
Docker
Denis, 2019-01-17 09:25:10

Best practice for developing and deploying docker images to production?

What are the best practices for developing and deploying docker images to production?
I plan to do this, but I'm not sure if it's the best way:
1. docker-compose image:
1.1. Postgres with the database exposed // to make backups
1.2. Rails with them sticking out:
1.2.1. log //to be aware of what is happening
1.2.2. public // to make backups
1.2.3. tmp // to keep abreast of what's going on
2. Deploy the image from development to production using the machine's development terminal
How I plan it to work:
1. development server:
1.1. the root of the project is visible
1.2. installed github repository
1.3. After the development is completed, the changes are committed to github
2.cloud.docker:
2.1. pulls changes from github
2.1. builds the image with Rails
2.2. after successful completion, build reports the readiness of the production image to the server
3. production server:
3.1. Pulls the Rails image from cloud.docker
3.2. Updates the current image to a new state
According to paragraphs 2.2. and throughout section 3, so far I have a lot of questions, which makes me think that everything can be done easier and probably there are already some ready-made tools?
I read about docker-machine, but I didn’t understand why to make another virtual system on top of the already virtual server on which production is running, and I left this idea as a last resort.
Does anyone in the community have a successful track record?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FruTb, 2019-01-18
@FruTb

Gitlab + Gitlab CI is a complete CI solution. After committing and pushing into it, everything can build and assemble docker images and deliver them to the production server. On the server, for example, install kubernetes and deploy to it. There is a lot of useful stuff in there. Local development and debugging can be done through minikube. Kubernetes will allow services to scale. (and ruby ​​services will have to scale 100%)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question