{"action":"opened","issue":{"url":"https://api.github.com/repos/DaoCloud/php-laravel-mysql-sample/issues/4","repository_url":"https://api.github.com/repos/DaoCloud/php-laravel-mysql-sample","labels_url":"https://api.github.com/repos/DaoCloud/php-laravel-mysql-sample/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/DaoCloud/php-laravel-mysql-sample/issues/4/comments","events_url":"https://api.github.com/repos/DaoCloud/php-laravel-mysql-sample/issues/4/events","html_url":"https://github.com/DaoCloud/php-laravel-mysql-sample/issues/4","id":188316738,"number":4,"title":"如何构建数据库呢？","user":{"login":"supgeek-rod","id":5748006,"avatar_url":"https://avatars.githubusercontent.com/u/5748006?v=3","gravatar_id":"","url":"https://api.github.com/users/supgeek-rod","html_url":"https://github.com/supgeek-rod","followers_url":"https://api.github.com/users/supgeek-rod/followers","following_url":"https://api.github.com/users/supgeek-rod/following{/other_user}","gists_url":"https://api.github.com/users/supgeek-rod/gists{/gist_id}","starred_url":"https://api.github.com/users/supgeek-rod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supgeek-rod/subscriptions","organizations_url":"https://api.github.com/users/supgeek-rod/orgs","repos_url":"https://api.github.com/users/supgeek-rod/repos","events_url":"https://api.github.com/users/supgeek-rod/events{/privacy}","received_events_url":"https://api.github.com/users/supgeek-rod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-09T18:21:46Z","updated_at":"2016-11-09T18:21:46Z","closed_at":null,"body":"相关文件如下 \r\n\r\nDockerfile \r\n```\r\nWORKDIR /app\r\nRUN sh /app/run.sh\r\n```\r\n\r\nrun.sh\r\n```\r\n#!/bin/bash\r\n\r\necho '################'\r\npwd\r\ncd /app/backend\r\npwd\r\n\r\nif [ -n \"$MYSQL_PORT_3306_TCP\" ]; then\r\n    echo 'run migrate'\r\n    php artisan migrate:refresh --seed\r\nelse\r\n    echo 'not run migrate'\r\nfi\r\n```\r\n\r\nDocker 构建 log 中有输出 `not run migrate`，然而在部署的 log 中却没有 migrate 执行的输出。\r\n绑定的数据库中也没有构建数据库。进入应用的控制台执行 `php artisan migrate:refresh --seed` 才能构建数据库。\r\n\r\n难道在应用部署中不会重新执行 `run.sh`？\r\n该如何解决这个问题呢？"}}
{"actor":{"display_login":"supgeek-rod"}}