Recommended Free Tools
The reliable production pattern is a multi-stage Docker image: install Django and Gunicorn in a build stage, copy the virtual environment and application into a small runtime stage, run the container as a non-root user, and start gunicorn myapp.wsgi:application --bind 0.0.0.0:8000. Docker Compose then builds that image and publishes port 8000. Keep a separate development stage for Django’s auto-reloading server and Compose Watch; do not use runserver for production traffic.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What the finished setup does
This guide creates one image that can serve a Django project through Gunicorn and one Compose service that exposes it on your machine. The production path is deliberately different from local development:
As an Amazon Associate I earn from qualifying purchases.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Production: Gunicorn is the WSGI process inside the container. The image contains only the runtime environment and application source needed to start it.
- Development: Django’s built-in server runs in a separate image stage, while Compose Watch synchronizes source edits so you can iterate without rebuilding after every change.
- Verification:
docker compose up --buildbuilds the image and publishes host port 8000 to container port 8000.
The examples use a project package named myapp. Substitute your actual Django project package wherever that name appears. The package is the directory containing settings.py and wsgi.py; it is not necessarily the name of an individual Django app.
Prerequisites and a clean project layout
Install Docker Engine or Docker Desktop with the Compose subcommand available as docker compose. Start with a Django project in a directory that will be used as the Docker build context. A typical layout after creating the project is:
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
project-root/
├── manage.py
├── myapp/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── ...
├── requirements.txt
├── Dockerfile
├── compose.yaml
└── .dockerignore
If you are starting from an empty directory, create the project before building the image:
python -m venv .venv
# Activate .venv using the command for your operating system
python -m pip install Django gunicorn
django-admin startproject myapp .
python -m pip freeze > requirements.txt
The local virtual environment is useful for creating and testing the project, but it should not be copied into the image. Docker will create and install its own environment during the build.
Add Django and Gunicorn to the dependency file
At minimum, requirements.txt must contain Django and Gunicorn:
Django
gunicorn
For a repeatable build, record the exact versions that your application has been tested with, or maintain a constraints/lock file and install from it. The important distinction is that the image installs dependencies from a file copied into the build context; it should not depend on packages that happen to be installed on the host.
Whenever you change dependencies, rebuild the image. A running container does not automatically acquire a newly edited requirements file.
Write a multi-stage production Dockerfile
Create a file named Dockerfile at the project root:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesFROM python:3.12-slim AS builder
ENV PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
PATH="/opt/venv/bin:$PATH"
WORKDIR /app
RUN python -m venv /opt/venv
COPY requirements.txt .
RUN pip install --upgrade pip &&
pip install --no-cache-dir -r requirements.txt
FROM builder AS development
WORKDIR /app
COPY . .
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
FROM python:3.12-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
PATH="/opt/venv/bin:$PATH"
WORKDIR /app
RUN addgroup --system django &&
adduser --system --ingroup django django
COPY --from=builder /opt/venv /opt/venv
COPY . .
RUN chown -R django:django /app
USER django
EXPOSE 8000
CMD ["gunicorn", "myapp.wsgi:application", "--bind", "0.0.0.0:8000"]
Why the stages are separate
- Builder stage: creates
/opt/venv, copies the dependency file, and installs Django, Gunicorn, and the rest of your requirements. Build-only work stays out of the final image. - Development stage: inherits the installed environment, copies the source tree, and starts Django’s development server on all container interfaces so the published port is reachable from the host.
- Runtime stage: starts again from a clean Python image, copies only the prepared virtual environment and source, exposes port 8000, and launches Gunicorn.
PYTHONUNBUFFERED=1 makes Python write logs immediately instead of holding them in a buffer. That matters when you are reading container logs or forwarding them to a logging system.
The 0.0.0.0:8000 bind address is essential inside a container. Binding only to 127.0.0.1 would make the process reachable only from inside the container, so a Compose port mapping would appear open while requests still failed.
The runtime image creates a dedicated django user and switches to it before startup. Running the application as a non-root user limits the impact of a process compromise and follows Gunicorn’s documented Docker security practice.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Replace python:3.12-slim with the Python image line compatible with your project. For reproducibility, pin the image tag (and, where your release process requires it, its digest) rather than silently moving between runtimes.
Keep host artifacts out of the build context
Create .dockerignore beside the Dockerfile:
.venv/
__pycache__/
*.pyc
.git/
Docker sends the build context to the builder. Excluding the local virtual environment, Python bytecode, and Git metadata makes the context smaller and prevents host-specific files from overwriting the environment prepared in the image. Add other generated files that your application does not need at runtime, but do not ignore source code, templates, migrations, or the dependency files required by the build.
Define the production Compose service
Create compose.yaml with a service that builds the final Dockerfile stage:
services:
web:
build:
context: .
target: runtime
ports:
- "8000:8000"
command: gunicorn myapp.wsgi:application --bind 0.0.0.0:8000
The target: runtime line makes the intent explicit: Compose should use the production stage, not the development stage. The command repeats the Dockerfile command so the serving process is visible in the Compose configuration and can be changed per environment without editing the image.
Do not add a source bind mount to this production service by default. A mount such as .:/app is useful while developing, but it can hide files copied into the image and accidentally replace the tested application with untracked host files. Use a separate development configuration for that workflow.
Build and run the application
- From the directory containing
compose.yaml, build and start the service:docker compose up --build - Open
http://localhost:8000/. You should receive the response from your Django URL configuration. The terminal shows Gunicorn and application output. - Stop the foreground service with
Ctrl+C. To start it in the background instead, usedocker compose up --build -d. - Inspect startup output with
docker compose logs -f web. This is the first place to look for an import error, a settings error, or a binding failure. - When you change Python dependencies or the Dockerfile, run
docker compose up --buildagain. A normal restart does not rebuild layers.
The port mapping has two parts: the first 8000 is the host port and the second is the container port. If port 8000 is already occupied, change only the host side, for example "8080:8000", and browse to http://localhost:8080/. Gunicorn still listens on port 8000 inside the container.
Use a development stage without weakening production
Django’s built-in server is convenient for local iteration because it reloads when source files change. It is not the production server. Compose Watch provides a separate development path that synchronizes edits into a running container instead of forcing a complete image rebuild for every change.
One development Compose file can target the stage already present in the Dockerfile:
services:
web:
build:
context: .
target: development
ports:
- "8000:8000"
develop:
watch:
- action: sync
path: .
target: /app
- action: rebuild
path: requirements.txt
- action: rebuild
path: Dockerfile
Use this file with a Docker Compose release that supports the develop.watch specification. Start it with:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
docker compose watch
Source changes are synchronized to /app; changes to dependencies or the Dockerfile trigger a rebuild because synchronization alone cannot install new packages or recreate image layers. If your Compose release does not support Watch, run the same development target with docker compose up --build and use a conventional source bind mount, understanding that this is a local-development arrangement.
Keep the production service and development service conceptually separate even if they share one file. The production target must continue to use Gunicorn, must not rely on a host source mount, and should be tested from the exact image that will be deployed.
Prepare Django for a real deployment
A container that answers a request on localhost is not automatically production-ready. Django’s deployment guidance requires an explicit review of static files, error reporting, security settings, HTTPS, performance, and the deployment checklist.
Run Django’s deployment check
Execute the check in the built image:
docker compose run --rm web python manage.py check --deploy
Run it with the same environment variables and settings that the deployment will use. It is not a substitute for testing, but it catches configuration problems that are easy to miss when the development settings are permissive.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Stop using runserver for production traffic
The development server is intended for local iteration. The production Compose target must start Gunicorn, either through the Dockerfile’s CMD or the Compose command. Verify the running process with docker compose logs web and confirm that the command contains gunicorn, not manage.py runserver.
Choose a static-file architecture
Decide where collected static assets will be served before deploying. Django’s deployment documentation distinguishes application configuration from the component that actually delivers static files. Depending on the hosting stack, static assets may be served by the application container, a reverse proxy, or a dedicated static-file service.
Set a production STATIC_ROOT, run the collection step during your release process, and verify that CSS, JavaScript, and image URLs resolve from a clean browser session. Do not assume that a successful Gunicorn response means static assets are configured; the application and static-file delivery path are separate concerns.
Separate environment-specific settings and secrets
Production settings should not inherit development defaults accidentally. Review debug mode, allowed hosts, database configuration, cookie security, trusted origins, and any setting that differs between environments. Supply secrets and environment-specific values at runtime through your deployment platform or Compose environment configuration rather than baking them into the image or committing them to source control.
Free tools Windows power users keep installed
One-click scans. No signup required.
Keep the image identical across environments whenever possible. Changing only runtime configuration makes a deployed artifact easier to reproduce and diagnose.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Put HTTPS in front of the application
Production traffic should use HTTPS. The TLS termination point may be a reverse proxy or a hosting platform in front of the container. Configure Django’s security settings to match that topology, and verify redirects, secure cookies, proxy headers, and host validation from the public endpoint rather than only from localhost.
Arrange error reporting and logs
Container logs are useful during development, but production needs an intentional error-reporting path. Configure Django and the hosting environment to capture unhandled exceptions, request failures, and process exits without exposing debug pages to users. Keep logs on standard output or route them to the platform’s collector so a container replacement does not erase the only copy.
Apply performance settings deliberately
Gunicorn is the WSGI process, not a complete edge architecture. Review database connection behavior, static-file delivery, request timeouts, proxy buffering, and the worker/process configuration appropriate to your workload and hosting limits. Do not copy a worker count from another application without measuring memory and response behavior in your own environment.
Run migrations and release tasks explicitly
Database migrations are a release operation, not a reason to start multiple competing migration processes in every web container. After the image is built and the database is reachable, run the migration command from a controlled release step:
docker compose run --rm web python manage.py migrate
Run static-file collection in the same controlled way when your chosen static architecture requires it:
docker compose run --rm web python manage.py collectstatic --noinput
The exact order depends on your database and static-file platform, but the principle is constant: make migrations and asset collection visible, repeatable release steps rather than hiding them in a web process that may be started more than once.
Development and production choices compared
| Decision | Development stage | Production stage |
|---|---|---|
| HTTP process | Django’s built-in server for local iteration | Gunicorn WSGI process |
| Source changes | Compose Watch synchronizes edits; dependency changes rebuild | Build a new image and deploy the tested artifact |
| Image target | development |
runtime |
| Source mount | Optional and limited to local work | Normally absent so the image remains the source of truth |
| Security posture | Convenience-oriented local settings | Non-root user, HTTPS, reviewed settings, secrets supplied at runtime |
| Static files | Whatever is fastest for local testing | Explicit application, reverse-proxy, or dedicated static architecture |
| Validation | Interactive debugging and quick reloads | manage.py check --deploy, release checks, error reporting, and deployment verification |
The table is not a choice between two equivalent servers. It is a boundary between two purposes: development speed versus production serving and repeatability.
Troubleshoot the common failures
Gunicorn says it cannot import myapp.wsgi
Confirm that the directory containing wsgi.py is really named myapp. If your project package has another name, change both the Dockerfile command and the Compose command to yourproject.wsgi:application. Also check that manage.py and the project package were copied into /app, not excluded by .dockerignore.
The container starts but the browser cannot connect
Check three addresses in order: Gunicorn must bind to 0.0.0.0:8000; Compose must publish 8000:8000 (or your chosen host-port variant); and no host firewall or process may already occupy the host port. The command docker compose ps shows whether the service is still running, while docker compose logs web shows whether it exited during startup.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Changes are not visible
In the production target, source changes require a new build because the source is copied into the image. Run docker compose up --build. In the development target, make sure you started Compose Watch and that the watch target is /app. A bind mount or watch rule that points at the wrong directory can hide the copied source.
New dependencies are missing
Editing requirements.txt does not alter an existing image. The watch configuration should mark that file for a rebuild; otherwise run docker compose build --no-cache web when cached layers are suspected, followed by docker compose up.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Static files return 404
Check that production settings define a collection directory, that the collection command completed, and that the selected static-file component is configured to serve that directory. Gunicorn serving dynamic Django responses does not, by itself, prove that static assets are reachable.
The process cannot write to a directory
The runtime container runs as django. Any directory that the application must write to needs an intentional ownership or volume policy; do not solve the problem by switching the whole container back to root. Rebuild after changing ownership instructions and inspect the effective user with docker compose run --rm web id.
check --deploy reports warnings
Treat each warning as a production configuration task. Run the check with production environment variables, then review debug mode, host and origin validation, HTTPS-related settings, cookies, secrets, and any setting that differs from local development. Repeat the check after changes rather than dismissing warnings because the homepage loads.
Moving from local Compose to Docker-compatible hosting
Compose is an effective local verification layer: it builds the same production image, publishes the application port, and gives you a repeatable command for release checks. A hosting platform or managed container service will add its own concerns, such as external HTTPS termination, persistent databases, secret injection, health checks, log retention, and a deployment mechanism.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Carry the runtime image and its Gunicorn command forward unchanged where the platform allows it. Adapt the surrounding service configuration—port assignment, environment variables, database connectivity, static-file delivery, and process supervision—to the host. Before switching traffic, run the deployment check, apply migrations through the release process, verify static files, and confirm that errors are reported without enabling debug output.
A concise release checklist
- Dependencies are recorded in a reviewed requirements or constraints file.
- The Dockerfile has a dependency/build stage and a separate runtime stage.
PYTHONUNBUFFERED=1is set so container logs are immediate.- The runtime image copies the prepared virtual environment and source, exposes port 8000, and starts Gunicorn on
0.0.0.0:8000. - The container runs as a non-root user.
.dockerignoreexcludes.venv/,__pycache__/,*.pyc, and.git/.- Compose’s production target is
runtimeand publishes the intended host port. - Development uses the separate stage and Compose Watch, never the production command for convenience.
python manage.py check --deploypasses with production settings.- Static files, HTTPS, error reporting, critical settings, and performance configuration have named owners and tested procedures.
- Migrations and static-file collection run as explicit release tasks.
With those boundaries in place, Docker packages the Django application consistently, Gunicorn provides the production WSGI process, and Compose gives you a reproducible path from local verification to a deployment-ready image.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




