A local dev full-stack template using docker-compose with Django and React.
The docker-django-react project is a local development template that combines Django as the backend framework, React as the frontend framework, and NGINX as the server. The project aims to provide an opinionated full-stack setup for developers using Docker-compose. It includes features like hot reload, Django Rest Framework, Docker containers, and support for serving static and media files with NGINX.
To use the docker-django-react project as a project template, follow these steps:
.env-example file. All services expect to read environment variables from the .env.dev file. Review the example file and change the name to .env.dev. Make sure your .gitignore file handles environment files to avoid committing sensitive information to a public repository.docker-compose build
-up flag to bring services up after the build.docker-compose up -d
-d flag to run the containers in detached mode.docker-compose down -v
-v flag to also delete named volumes.docker-compose logs <service-name>
docker exec -it <container-name> sh
The docker-django-react project is a local development template that combines Django, React, and NGINX using Docker-compose. It provides a convenient setup for full-stack development, with features like hot reload, Django Rest Framework, and Docker containers. By using NGINX for handling requests and serving files, the template also addresses CORS issues.