Overview:
The content is a guide on how to install and use a Django/React template for testing the backend and performing linting. It also includes instructions for Windows installation, setting up the environment, and using Docker commands.
Features:
- Backend Testing: Implements pytest via tox and provides instructions for running tests inside the Django container.
- Linting Backend: Uses black to autoformat code and flake8 for linting, with Docker commands provided for invoking these processes.
- Frontend: Utilizes prettier for code autoformatting and eslint for linting, with Docker commands for linting and applying formatting.
- Windows Installation: Provides step-by-step instructions for installing Docker for Windows, setting up Ubuntu, and configuring Visual Studio Code for use with Ubuntu.
- Build The Environment: Describes how to create a .env file for configuring the database credentials, as well as the necessary commands for building and bringing up the containers.
- Docker Commands: Offers useful Docker commands for building, running, logging, and stopping containers, as well as executing scripts inside containers.
- File Structure: Explains the organization of Docker container configuration files in the conf folder.
Installation:
- Install Docker for Windows.
- Install Ubuntu and the Remote - WSL extension for Visual Studio Code.
- Check that Ubuntu is set as a WSL 2 Distro in Docker’s Settings.
- Create a .env file in the project root with the necessary database credentials.
- Run the command
mkdir -p ~/srv/docker/template-postgresql/datato create the directory for the Postgres volume. - Build the containers with
docker-compose buildand bring them up withdocker-compose up -d. - View the container logs with
docker-compose logs -f. - Use the provided Docker commands for various tasks such as stopping containers, executing commands inside containers, and more.
Summary:
The content provides a comprehensive guide for installing and using a Django/React template for testing the backend and performing linting. It includes instructions for Windows installation, setting up the environment, and using Docker commands for managing the containers. The guide also highlights key features such as backend testing, linting (both backend and frontend), and provides insights into the file structure and Docker container configurations.