Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Proposal for blue-green deployment #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

john-gom
Copy link
Collaborator

Signed-off-by: John Gomersall [email protected]

What

  • Proposed decision record for managing blue-green deployments

volumes:
- dbdata_v2:/var/data
```
Note that the dbdata_v2 volume name is retained. Running `docker compose up --remove-orphans` in this case would remove the `example_next` container and replace the old `example` container with the new version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In production we use external volumes for volumes that contains data (this is important to be able to do docker compose down -v without loosing actual data, but also because loosing automatically created volumes is far too easy).

So you must add:

  • modification of external volume name in Makefile
  • creation of the new external volume
    and after migration:
  • removal of old external volume.

- dbdata:/var/data
```

The first step in deploying a new version would be to add a new service and volume and update the old service to use the last build image, e.g.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't explicitly tell how you intend those changes to be done.

Personally, for this kind of migration, it seems ok to me to do them directly editing files in production. This avoids a lot of latency and even eventual pitfalls due to CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants