A dockerized starter boilerplate template for Django backend & React frontend.
Stacks used:
- Django
- MySQL
- React (with webpack and hot reload)
- Nginx
- Docker
Notes
- This is a decoupled web application i.e Django Rest API <> React Client
- React app will be built and bundled into /static folder where index.html will be served via Nginx proxy
- For local environment, create your own .env file (see .env.example file in /app folder)
- Docker
- A cup of coffee :)
In the project root folder (where docker-compose.yml file resides)
docker-compose up
#start development server - run this inside Docker container (/frontend)
npm run start
#build react application - run this inside Docker container (/frontend)
npm run build
Following ports are available upon a successful start
- localhost:8000 : Django application
- localhost:80 : React application (deployed)
- localhost:3000 : React development server