{"action":"created","issue":{"url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/47","repository_url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform","labels_url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/47/comments","events_url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/47/events","html_url":"https://github.com/aaronchen2k/ngtesting-platform/issues/47","id":356533462,"node_id":"MDU6SXNzdWUzNTY1MzM0NjI=","number":47,"title":"如何升级代码版本而不影响到现有docker中mysql存储的数据？","user":{"login":"bitlin","id":14798891,"node_id":"MDQ6VXNlcjE0Nzk4ODkx","avatar_url":"https://avatars1.githubusercontent.com/u/14798891?v=4","gravatar_id":"","url":"https://api.github.com/users/bitlin","html_url":"https://github.com/bitlin","followers_url":"https://api.github.com/users/bitlin/followers","following_url":"https://api.github.com/users/bitlin/following{/other_user}","gists_url":"https://api.github.com/users/bitlin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitlin/subscriptions","organizations_url":"https://api.github.com/users/bitlin/orgs","repos_url":"https://api.github.com/users/bitlin/repos","events_url":"https://api.github.com/users/bitlin/events{/privacy}","received_events_url":"https://api.github.com/users/bitlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-03T14:48:42Z","updated_at":"2018-09-04T05:03:24Z","closed_at":null,"author_association":"NONE","body":"能否提供一下升级步骤呢？"},"comment":{"url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/comments/418241994","html_url":"https://github.com/aaronchen2k/ngtesting-platform/issues/47#issuecomment-418241994","issue_url":"https://api.github.com/repos/aaronchen2k/ngtesting-platform/issues/47","id":418241994,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODI0MTk5NA==","user":{"login":"aaronchen2k","id":3222874,"node_id":"MDQ6VXNlcjMyMjI4NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3222874?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronchen2k","html_url":"https://github.com/aaronchen2k","followers_url":"https://api.github.com/users/aaronchen2k/followers","following_url":"https://api.github.com/users/aaronchen2k/following{/other_user}","gists_url":"https://api.github.com/users/aaronchen2k/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronchen2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronchen2k/subscriptions","organizations_url":"https://api.github.com/users/aaronchen2k/orgs","repos_url":"https://api.github.com/users/aaronchen2k/repos","events_url":"https://api.github.com/users/aaronchen2k/events{/privacy}","received_events_url":"https://api.github.com/users/aaronchen2k/received_events","type":"User","site_admin":false},"created_at":"2018-09-04T05:03:24Z","updated_at":"2018-09-04T05:03:24Z","author_association":"OWNER","body":"已经给MySQL和SpringBoot容器加上版本号，目前为1.0.10。\r\n\r\n**_Once you create and start containers by using \"docker-compose up\" command, next time you should use \"docker-compose start|stop\" to avoid to docker-compose re-creating the container after the remote image changed, which will cause data-losing._**\r\n\r\n当再次使用docker-compose up命令，尝试升级前，请务必备份你的数据，升级成功后恢复整个DB，然后运行版本升级配套的SQL脚本。\r\n\r\n我这边目前会做得是：\r\n\r\n- 每次容器启动时，MySQL容器中的setup.sh脚本，会判断数据是否已初始化，不会覆盖现有的数据；\r\n- 后续升级，比如从1.0.10到1.0.20，我会给出升级指南，包括数据库的升级脚本；\r\n- 升级与否、升级到什么版本，由docker-compose.xml文件里的两个镜像版本号的变化来决定，请进一步确认。\r\n"}}
{"actor":{"display_login":"aaronchen2k"}}