0
1

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で最速Django、MariaDB、Gunicornの開発環境構築

Last updated at Posted at 2020-08-06

docker-composeを用いて、DJangoの開発環境を整える、docker-compose.ymlを自分で作成しました。

こちらを使って、Djangoの開発環境を整えます。

目次

1.レポジトリのクローン
2.設定ファイル(.env)/Requirements.txtのコピー
3.イメージのbuild
3.localhostにアクセス
4.settings.pyを編集
5.ご意見募集中!!!
5.おわりに

1. レポジトリのクローン

git clone https://github.com/yuta-hidaka/Docker-Django-MariDB-Gunicorn.git/ hogehoge

2. 設定ファイル(.env)/Requirements.txtのコピー

.envで必要な情報を書き換えてください
requirements.txtで必要なmoduleを調整してください

cd hogehoge
cp .env.sample .env
cp django_data/requirements.txt.sample django_data/requirements.txt

3. イメージのbuild

cd hogehoge
docker-compose up --build

4. localhostにアクセス

表示されていることを確認
image.png

5. settings.pyを編集

接続先をMariaDBに変更し、Djnagoの初期設定に従って進んでください。

6. ご意見募集中!!!

Docker初心者が作ったファイルのため、改善意見や、これはダメなんじゃない?
といった意見をお待ちしています!!

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?