📑

docker compose + django の作り方

2022/01/17に公開

以下のサイトを参考に作る メモ書き

https://docs.docker.jp/compose/django.html

touch docker-compose.yml Dockerfile requirements.txt

sudo docker-compose run web django-admin startproject project . 

docker-compose up --build

docker-compose run --rm web django-admin startapp app名 .
or
docker-compose run --rm web django-admin startapp app名

docker-compose run --rm web python3 manage.py makemigrations

docker-compose run --rm web python3 manage.py migrate

docker-compose run --rm web python3 manage.py createsuperuser

Discussion