GithubHelp home page GithubHelp logo

docker-django-react's Introduction

Docker環境内でDjangoとReactを連携させて起動する初期設定例

Django localhost:8000/
React localhost:3000/

TOPページはlocalhost:3000/
※DjangoをWebAPIとして使う方法(react-routerなどが使えない可能性がある。)

Makefileにてショートカットを登録してあります。
xcodeのインストールを必要とされます。xcode-select --install  

使用例:

make django
make app=todos
app:    docker-compose run --rm app sh -c "python manage.py startapp ${app}"

test:    docker-compose run --rm app sh -c "pytest -l -v -s ${app} && flake8"

migrate:
    docker-compose run --rm app sh -c "python manage.py makemigrations"
    docker-compose run --rm app sh -c "python manage.py migrate"

pro:    docker-compose run --rm app sh -c "django-admin startproject ${pro} ."

admin:    docker-compose run --rm app sh -c "python manage.py createsuperuser"

django:    docker-compose run --rm app sh -c "django-admin startproject app ."

react:    docker-compose run --rm react sh -c "create-react-app frontend"

docker-django-react's People

Contributors

null223 avatar

Stargazers

tn1994 avatar

Watchers

 avatar

docker-django-react's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.