1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker-Composeでコンテナをビルドする際に起こったエラーと解決策まとめ

Posted at

はじめましての方ははじめまして。

未来電子テクノロジーでインターンをしている<@kento_o>です。

今回は、Quickstart: Compose and Djangoを一通り試してみる中で起こったエラーと解決策をログとして残しておきます。

起こったエラー

・Dockerファイルを誤植した際に起こったエラー
・データベースにコネクトし、ページを表示する際に起こったエラー
1つ目のエラーは至極単純なものですが、2つ目が厄介でした。

Disarrowed?

Screenshot from 2019-04-17 11-22-00.png
このようなエラーが出力されました。
んん?hostが許されていない......?
1時間ほどエラー原因を探してみたところ、どうも「Setting.py」の設定ミスのよう。

setting.py

ALLOWED_HOSTS = []

となっていたので、

setting.py

ALLOWED_HOSTS = ['*']

に変更

解決

django-it-worked.png

やりました,b

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?