質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

1回答

2453閲覧

Dockerで外部DBを使用してRedmineを起動したい

Perfume-T-Anata

総合スコア25

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2020/06/04 06:28

前提・実現したいこと

既存のRedmine環境をDockerに移行する計画をしています。

既存のDBを使ってDockerで起動しようとしてますが
ブラウザからlocalhostへアクセスしてもなにも表示されません。
コンソール上には以下のメッセージが出ています。
エラー等はないように見えます。

発生している問題・エラーメッセージ

Initializing logdir... Initializing datadir... Symlinking dotfiles... Installing configuration templates... Configuring redmine... Configuring redmine::database Configuring redmine::unicorn... Configuring redmine::secret_token... Generating a session token... Note: All old sessions will become invalid. Please specify the REDMINE_SECRET_TOKEN parameter for persistence. **SHOULD** be defined if you have a load-balancing Redmine cluster. Configuring redmine::max_concurrent_ajax_uploads... Configuring redmine::sudo_mode... Configuring redmine::autologin_cookie... Configuring redmine::backups... Configuring nginx... Configuring nginx::redmine... Installing plugins... Installing themes... 2020-06-04 06:09:29,159 CRIT Supervisor running as root (no user in config file) 2020-06-04 06:09:29,159 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing 2020-06-04 06:09:29,159 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing 2020-06-04 06:09:29,159 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing 2020-06-04 06:09:29,181 INFO RPC interface 'supervisor' initialized 2020-06-04 06:09:29,181 INFO supervisord started with pid 1 2020-06-04 06:09:30,186 INFO spawned: 'unicorn' with pid 218 2020-06-04 06:09:30,197 INFO spawned: 'cron' with pid 219 2020-06-04 06:09:30,201 INFO spawned: 'nginx' with pid 220 2020-06-04 06:09:31,785 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-06-04 06:09:31,785 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-06-04 06:09:31,786 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

発行したコマンド

docker run --name=redmine -p 80:80 -it --rm --env=DB_ADAPTER=mysql2 --env=DB_HOST=XXX.rds.amazonaws.com --env=DB_NAME=redmine --env=DB_USER=hogehoge --env=DB_PASS=fugafuga --volume=/srv/docker/redmine/redmine:/home/redmine/data sameersbn/redmine:4.0.7

補足情報(FW/ツールのバージョンなど)

既存環境
Redmine:4.0.7(AWS上のEC2インスタンス)
DB:MySQL8 (AWS上のRDS)

移行環境
Image:sameersbn/Redmine:4.0.7(local)
DockerDesktop(2.3.0.3)
DB:MySQL8(AWS上のRDS)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

bsdfan

2020/06/04 12:50

AWSのRDSは、インターネット経由での接続を許可しているのでしょうか?
guest

回答1

0

ブラウザからlocalhostへアクセスしてもなにも表示されません。

ブラウザは「接続できない」的なエラーを表示してないんですか?

ブラウザとサーバ間でネットワーク疎通が出来ているとして、ブラウザの開発者ツールなどでサーバが返してきたコンテントやエラーコードを確認してみてはどうでしょうか。

ブラウザからサーバにアクセスした時、サーバ側のログには何も出力されていないんでしょうか?

投稿2020/06/04 12:18

hidori

総合スコア402

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Perfume-T-Anata

2020/06/09 04:05

Badgatewayといった表示がされます。 Logを確認したところ以下でした。 Initializing logdir... Initializing datadir... Symlinking dotfiles... Installing configuration templates... Configuring redmine... Configuring redmine::database Configuring redmine::unicorn... Configuring redmine::secret_token... Generating a session token... Note: All old sessions will become invalid. Please specify the REDMINE_SECRET_TOKEN parameter for persistence. **SHOULD** be defined if you have a load-balancing Redmine cluster. Configuring redmine::max_concurrent_ajax_uploads... Configuring redmine::sudo_mode... Configuring redmine::autologin_cookie... Configuring redmine::backups... Configuring nginx... Configuring nginx::redmine... Installing plugins... Installing themes... 2020-06-09 04:00:25,680 CRIT Supervisor running as root (no user in config file) 2020-06-09 04:00:25,680 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing 2020-06-09 04:00:25,680 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing 2020-06-09 04:00:25,680 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing 2020-06-09 04:00:25,692 INFO RPC interface 'supervisor' initialized 2020-06-09 04:00:25,693 INFO supervisord started with pid 1 2020-06-09 04:00:26,697 INFO spawned: 'unicorn' with pid 219 2020-06-09 04:00:26,699 INFO spawned: 'cron' with pid 220 2020-06-09 04:00:26,702 INFO spawned: 'nginx' with pid 221 2020-06-09 04:00:27,742 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-06-09 04:00:27,742 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-06-09 04:00:27,742 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) BadgatewayになるときはInitializing datadir...で止まっていたのですが しばらく待つとアクセスできるようになったのですが、コンテナの起動に非常に時間がかかるようです。 2.3分ほど待てばアクセスできるようになるのですが・・・
hidori

2020/06/10 09:32

>BadgatewayになるときはInitializing datadir...で止まっていたのですが >しばらく待つとアクセスできるようになったのですが、コンテナの起動に非常に時間がかかるようです。 それは「コンテナの起動」というか、Redmine の初期化処理ですよね。 Redmine を自分で動かしてみたことが無いのでよく分かりませんが、初回起動時は時間がかかるのではないでしょうか? https://hub.docker.com/r/sameersbn/redmine/ には ``` docker run --name=redmine -d \ --link=postgresql-redmine:postgresql --publish=10083:80 \ --env='REDMINE_PORT=10083' \ --volume=/srv/docker/redmine/redmine:/home/redmine/data \ sameersbn/redmine:4.1.1-2 ``` のように、Redmine のコンテナ起動時のオプションで Data ディレクトリをホストのファイルシステムにマップしているので、2回目以降の起動では時間がかからなくなるのではないでしょうか。 >DockerDesktop(2.3.0.3) macOS 版ですか? macOS 版の Docker for Desktop は、-v でマップしたファイルシステムのパフォーマンスがとても悪い、と聞いたことがあります。 https://blog.hgrs.me/20191208114524
unoSSkR

2020/06/13 08:48

The log message shows you that the secret token should be recreated on a new redmine server. I am not sure whether this solve your problem.
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問