> ## Documentation Index
> Fetch the complete documentation index at: https://docs.springwinter.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Django, Flask or Spring Boot containers

> Prepare Django, Flask and Spring Boot containers with production servers, health checks, private dependencies and explicit framework validation limits.

Django, Flask and Spring Boot can use SpringWinter's container web-server path when the application listens on a supported port and its dependencies fit the platform. There is no automatic framework conversion. Supply a reviewed Dockerfile or supported public image and verify the exact framework version you use.

## Suitability and evidence

Use this guide to map an existing application to the [compatibility reference](https://docs.springwinter.dev/reference/compatibility.md). The public template release has a FastAPI backend, but no Django, Flask or Spring Boot application. Their framework-specific production configuration and AWS deployment remain unverified here. Do not present an illustrative command as a tested deployment.

You need a reproducible repository and lockfiles, a production server or runnable JVM artifact, a health path, a SpringWinter account, a verified AWS connection and GitHub access for source builds. Add private SQL or cache resources only if your app needs them. Docker is needed for local image tests.

## Common architecture

```mermaid theme={null}
flowchart LR
    Operator[Dashboard or coding agent] --> Control[SpringWinter control plane]
    Control -->|Approved deployment| AWS
    Client[Client] --> ALB
    subgraph AWS[Customer-owned AWS account]
        ALB[Application load balancer]
        App[Framework HTTP container]
        SQL[Optional private SQL database]
        Store[Optional private S3 storage]
        ALB --> App
        App --> SQL
        App -->|Application adapter| Store
    end
```

The server listens on `0.0.0.0`, and its configured health path returns HTTP 200 over the container's HTTP port without login or redirects. Public HTTPS terminates through the supported service path. Configure trusted proxy handling using your framework's guidance; do not trust arbitrary forwarded headers from every source.

## Framework preparation checklist

| Framework | Production requirements | Common mistake |
| - | - | - |
| Django | Reviewed WSGI/ASGI server, allowed hosts, production settings, static/media strategy, protected secret key and migration plan. | Running the development server or keeping uploaded media only in the task filesystem. |
| Flask | Dedicated production WSGI server, debugger disabled, explicit application entry point and proxy configuration. | Starting Flask's development server in production. |
| Spring Boot | Runnable artifact/image for the selected Java version, container memory fit, known server port and suitable health behavior. | Assuming an Actuator endpoint exists and is public without adding/configuring it. |

Read the official [Django deployment checklist](https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/), [Flask production deployment guidance](https://flask.palletsprojects.com/en/stable/deploying/) and [Spring Boot container-image guidance](https://docs.spring.io/spring-boot/reference/packaging/container-images/) for the exact version you use. These sources establish framework requirements, not a claim that SpringWinter automates them.

Do not copy a generic Dockerfile with guessed module names. Identify the actual application entry point, package manager, lockfile and artifact path. Pin compatible dependencies. Exclude credentials, local environments and database files from the build context.

## Reproducible starting evidence

For the existing Python container example, use [React and FastAPI](https://docs.springwinter.dev/deploy/frameworks/react-fastapi.md). Its backend includes a locked uv environment and a Dockerfile that starts Uvicorn on port 8000. You can run its tests without a database:

```bash theme={null}
git clone --branch v0.1.0 --depth 1 \
  https://github.com/SpringWinter-Research/templates.git springwinter-templates
cd springwinter-templates/react-fastapi/backend
uv sync --frozen
uv run python -m unittest
docker build -t springwinter-fastapi .
```

This does not test Django, Flask or Java. For those applications, first run their repository-specific unit tests with fake dependencies or new disposable services. Build the exact Dockerfile/context locally. Start the image with private local configuration, then probe its health and a representative route. Record the results and any remaining gaps before requesting AWS deployment approval.

## Configure and deploy

In the dashboard, select a GitHub web server and set the repository-relative Dockerfile path, separate root-directory/build context, actual port and health path. Keep private database credentials, framework secret keys and provider keys in runtime variables. Public frontend configuration belongs at build time; server secrets do not.

Create dependencies first and wait for them. For Django or another schema-based application, approve a specific migration step and backup policy. The platform API does not establish a generic release-command runner. Do not race migrations across replicas or assume an image rollback reverses data changes.

A [coding agent](https://docs.springwinter.dev/guides/coding-agents.md) can inspect and produce the plan. REST clients use the current [Web servers](https://docs.springwinter.dev/api-reference/web-servers.md) and [Databases](https://docs.springwinter.dev/api-reference/databases.md) operations. Verify required fields and returned envelopes; a language name is not a deployment API type.

## Verification and troubleshooting

Observe the exact workflow and returned public URL. Check HTTPS, health and real application behavior. Test static assets, login, authorization and database access where applicable. For Spring Boot, include startup and memory observations; a longer startup does not justify disabling health checks without understanding the cause.

A 503 can indicate no healthy load-balancer targets rather than a framework response. A database timeout can be routing or TLS configuration rather than a bad password. An asset URL that worked locally can depend on a development server. Use [deployment troubleshooting](https://docs.springwinter.dev/troubleshooting/deployments.md) and bounded logs to separate these cases.

## Security, cost and cleanup

Keep debug output disabled on public endpoints. Store durable media outside task filesystems. Verify backups, restore steps and dependency updates. Estimate selected compute, shared load balancing, SQL/cache, logs and storage with [cost estimation](https://docs.springwinter.dev/guides/cost-estimation.md). No measured framework memory sizing or throughput is asserted.

After an approved experiment, remove previews and compute, then decide which data resources and recovery artifacts to keep. Recheck AWS billing. Never delete a database merely to make a failed deployment easier to retry.

## Questions

**Does the framework being containerizable prove support?** No. Check its storage, networking, background processes and infrastructure requirements separately.

**Can I use an existing public image?** A web server supports public images. Review the image's version, architecture, health behavior and setup exposure before creating it; private registries are a separate unsupported requirement.

Related: [Docker packaging](https://docs.springwinter.dev/deploy/frameworks/docker.md), [customer-owned AWS](https://docs.springwinter.dev/guides/customer-owned-aws.md), [full-stack applications](https://docs.springwinter.dev/guides/full-stack-apps.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.