Prerequisites
- Windows/macOS
- Linux
Install Docker Desktop, which includes Docker Engine and Docker Compose in a single installer.
No Python, Node.js, PostgreSQL, or any other dependency needs to be installed on your host machine when using Docker.
Docker Architecture
The Docker setup runs three containers:- web: The Django application (Python 3.7)
- db: PostgreSQL 14 database
- memcached: Memcached caching layer
Quick Start
Build and start services
The first build will take several minutes as it installs system and Python dependencies. Subsequent starts will be much faster due to Docker layer caching.
Wait for automatic setup
The entrypoint script will automatically (on first run):
- Create
local_settings.pyfrom the Docker template - Create media symlinks (
images,styles) - Wait for PostgreSQL to be ready
- Run database migrations
- Collect static files
To force setup steps to run again (e.g., after pulling new code):
Access the site
Once you see
Starting development server at http://0.0.0.0:8000/, open your browser and navigate to:Configuration
The Docker setup usesesp/esp/local_settings.py.docker as the template for local_settings.py. It is automatically copied on first run.
Key Configuration Differences
The Docker configuration includes:DATABASES['default']['HOST']is'db'(the Docker service name) instead of'localhost'CACHES['default']['LOCATION']is'memcached:11211'instead of'127.0.0.1:11211'ALLOWED_HOSTSis['*']for convenience in local development
Customizing Settings
If you need to customize settings:- Edit
esp/esp/local_settings.pydirectly (it is gitignored) - Or edit
esp/esp/local_settings.py.dockerto change the defaults for all Docker users
Next Steps
Docker Commands
Learn common Docker commands for development
Contributing
Read the contribution workflow and guidelines