前提・実現したいこと
dockerを使ってrailsとMysqlのAPIサーバーを開発する環境を作りたいと考えています
このサイトを参考に進め、動作確認まで完了できました。しかし、コンテナを起動させてコンテナ内で
bundle exec rails g model User name:string email:string
などを実行してモデルを作成しても、volumeが正しくマウントされておらず、ローカルに変更が反映されていないようでした
同じような問題を解決したことがある方がいたら解決策を教えていただきたいです。
発生している問題・エラーメッセージ
docker-compose up
を実行すると以下のようなメッセージが出力されます
Creating network "app_name_default" with the default driver Creating app_name_db_1 ... done Creating app_name_app_1 ... done Attaching to app_name_db_1, app_name_app_1 db_1 | 2020-03-25T12:06:46.655110Z 0 [Note] mysqld (mysqld 5.7.10) starting as process 1 ... db_1 | 2020-03-25T12:06:46.658851Z 0 [Note] InnoDB: PUNCH HOLE support available db_1 | 2020-03-25T12:06:46.658899Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins db_1 | 2020-03-25T12:06:46.658910Z 0 [Note] InnoDB: Uses event mutexes db_1 | 2020-03-25T12:06:46.658923Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier db_1 | 2020-03-25T12:06:46.658933Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 db_1 | 2020-03-25T12:06:46.658942Z 0 [Note] InnoDB: Using Linux native AIO db_1 | 2020-03-25T12:06:46.659214Z 0 [Note] InnoDB: Number of pools: 1 db_1 | 2020-03-25T12:06:46.659388Z 0 [Note] InnoDB: Using CPU crc32 instructions db_1 | 2020-03-25T12:06:46.669164Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M db_1 | 2020-03-25T12:06:46.679139Z 0 [Note] InnoDB: Completed initialization of buffer pool db_1 | 2020-03-25T12:06:46.681668Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). db_1 | 2020-03-25T12:06:46.694269Z 0 [Note] InnoDB: Highest supported file format is Barracuda. db_1 | 2020-03-25T12:06:46.696008Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 11990177 db_1 | 2020-03-25T12:06:46.696050Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 11990186 db_1 | 2020-03-25T12:06:46.696429Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 11990186 db_1 | 2020-03-25T12:06:46.696473Z 0 [Note] InnoDB: Database was not shutdown normally! db_1 | 2020-03-25T12:06:46.696490Z 0 [Note] InnoDB: Starting crash recovery. db_1 | 2020-03-25T12:06:46.825383Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" db_1 | 2020-03-25T12:06:46.825447Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables db_1 | 2020-03-25T12:06:46.825523Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... db_1 | 2020-03-25T12:06:46.862281Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. db_1 | 2020-03-25T12:06:46.863388Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. db_1 | 2020-03-25T12:06:46.863421Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. db_1 | 2020-03-25T12:06:46.864182Z 0 [Note] InnoDB: Waiting for purge to start db_1 | 2020-03-25T12:06:46.914477Z 0 [Note] InnoDB: 5.7.10 started; log sequence number 11990186 db_1 | 2020-03-25T12:06:46.914791Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool db_1 | 2020-03-25T12:06:46.914962Z 0 [Note] InnoDB: not started db_1 | 2020-03-25T12:06:46.915192Z 0 [Note] Plugin 'FEDERATED' is disabled. db_1 | 2020-03-25T12:06:46.919954Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key db_1 | 2020-03-25T12:06:46.919993Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 db_1 | 2020-03-25T12:06:46.920045Z 0 [Note] IPv6 is available. db_1 | 2020-03-25T12:06:46.920059Z 0 [Note] - '::' resolves to '::'; db_1 | 2020-03-25T12:06:46.920068Z 0 [Note] Server socket created on IP: '::'. db_1 | 2020-03-25T12:06:46.921117Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200325 12:06:46 db_1 | 2020-03-25T12:06:46.926093Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. db_1 | 2020-03-25T12:06:46.926143Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. db_1 | 2020-03-25T12:06:46.932684Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. db_1 | 2020-03-25T12:06:46.966144Z 0 [Note] Event Scheduler: Loaded 0 events db_1 | 2020-03-25T12:06:46.966496Z 0 [Note] mysqld: ready for connections. db_1 | Version: '5.7.10' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)```
dockerについての理解がいまいちで、原因が特定できずにいます。助言をいただけると幸いです。
補足情報(FW/ツールのバージョンなど)
あなたの回答
tips
プレビュー