We have been moving our project to automated deployments recently. For the past few days I have configured our docker containers to communicate with each other using docker-compose. Now we are moving everything to Gitlab CI, that builds the application image on a push.
However, Im stuck on a conceptual part of the flow. How does the remote Digital Ocean droplet that I have my application running on in coordination with the other docker containers know when to pull a new image built in CI?
Is there a script that needs to be written that checks the new image and pulls the container?
If I'm running the containers on the remote server with docker-compose, would the containers be able to be swapped out easily with the new container?
EDIT
In the gitlab docs the
deploy:
stage: deploy
script:
- ./deploy.sh
only:
- master
What would deploy.sh look like?
Aucun commentaire:
Enregistrer un commentaire