docker-compose.ymlでRedmineとMariaDBを定義して、
docker-compose upをしました。
ブラウザからredmineに接続はできるのですが、redmineからmariadbに接続できていません。
↓mariadbにはredmineのDBはありますが、中身がありません。
MariaDB [redmine]> show tables; Empty set (0.000 sec)
↓docker-compose up時のログを見るとmigtation時にsqliteに書き込んでいるようです。
warning: missing REDMINE_DB_MYSQL, REDMINE_DB_POSTGRES, or REDMINE_DB_SQLSERVER environment variables *** Using sqlite3 as fallback. *** The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`. The Gemfile's dependencies are satisfied I, [2019-03-25T14:35:45.703552 #29] INFO -- : Migrating to Setup (1) == 1 Setup: migrating ========================================================= -- create_table("attachments", {:force=>true})
↓docker-compose.yml
version: '2' services: redmine: image: redmine:3.4.9 container_name: redmine ports: - 8080:3000 environment: REDMINE_DB_MYSQL: db REDMINE_DB_PASSWORD: *** depends_on: - db #restart: always volumes: - ./files:/usr/src/redmine/files - ./plugins:/usr/src/redmine/plugins - ./themes:/usr/src/redmine/public/themes - /etc/localtime:/etc/localtime:ro environment: TZ: Asia/Tokyo db: image: mysql:5.7 container_name: mysql command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci environment: MYSQL_ROOT_PASSWORD: *** MYSQL_DATABASE: redmine TZ: Asia/Tokyo restart: always
mariadbに接続するようにしたいのですが、どこを修正したらよいかわかりません。
よろしくお願いいたします。

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/03/25 08:00 編集