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

MAGECLOUD-3978: [Spike][Cloud Docker] DB data should persist in a volume #92

Merged
merged 2 commits into from
Nov 5, 2019

Conversation

oshmyheliuk
Copy link
Contributor

@oshmyheliuk oshmyheliuk commented Oct 31, 2019

Description

Fixed Issues (if relevant)

https://magento2.atlassian.net/browse/MAGECLOUD-3978

Manual testing scenarios

  1. Install magento on docker, check that site works
  2. Run docker-compose down
  3. Run docker-compose up -d
  4. Connect to mysql from db container and check that database exists
  5. Check that Magento frontend is opening.
  6. Check in production and developer modes.

https://jira.corp.magento.com/browse/MAGECLOUD-70

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages

@oshmyheliuk oshmyheliuk added the Release: 1.0.0 Magento-Cloud-Docker Release label Oct 31, 2019
@joeshelton-wagento
Copy link
Contributor

Pros:

  • Increase DB data persistence and prevent unintentional loss of data from the use of the "down" command. Instead users will need to use "docker volume rm" command to dispose of data, which is much more explicit.
  • The volume has better namespacing. Frequent users of Docker have many volumes, and a volume named with random characters is difficult to manage.
  • Named volume for DB is used by most of the Magento community Docker configurations. User switching to Magento's solution should not find that their usual workflows lead to data loss.
    https://github.com/meanbee/docker-magento2
    https://github.com/markshust/docker-magento

Copy link

@ngreimel-lt ngreimel-lt left a comment

Choose a reason for hiding this comment

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

I love it! LGTM

NIT: Could .docker/mysql/docker-entrypoint-initdb.d be mounted ro?

@mattskr
Copy link

mattskr commented Nov 1, 2019

As mentioned in the closed PR usually we use docker-compose stop to shut down the containers and leave our DB intact. We use docker-compose down to destroy/recreate.

This works fine for my developers workflow so I think all we need here is better documentation between down and stop.

@shiftedreality
Copy link
Member

Thanks for the review! Moved to QA

@andriyShevtsov andriyShevtsov self-assigned this Nov 4, 2019
@andriyShevtsov
Copy link
Contributor

QA approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: accept PR/issue status Release: 1.0.0 Magento-Cloud-Docker Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants