Skip to content

Commit 99174dc

Browse files
committed
update blog post
1 parent c44b7b0 commit 99174dc

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

blog/2025-04-10-easiest-way-to-deploy-django.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ author: Defang Team
44
tags: [deployment, django, docker, compose]
55
---
66

7+
<iframe style={{
8+
width: "100%",
9+
aspectRatio: 16/9,
10+
}} src="https://www.youtube.com/embed/edWas0ZIeHI?si=SHD8QYcGLLeuPQ6l" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
11+
712
# Deploying a Django App with Real-time Moderation Using Defang
813

914
In this guide, we'll walk through the easiest and fastest way to deploy a full-featured Django application—including real-time chat and background task processing—to the cloud using Defang. You'll see firsthand how simple Defang makes it to deploy apps that require multiple services like web servers, background workers, Redis, and Postgres.
@@ -30,7 +35,7 @@ You can quickly spin up the application locally with:
3035
docker compose --env-file .env.dev -f compose.dev.yaml up --build
3136
```
3237

33-
This replicates your production environment locally, passing environment variables in the same way as we will with Defang's [secure configuration system](https://docs.defang.io/docs/concepts/configuration).
38+
This runs things with autoreloading so you can iterate on the Django app, all while passing environment variables in the same way as we will with Defang's [secure configuration system](https://docs.defang.io/docs/concepts/configuration) and being ready to deploy to production.
3439

3540
## Application Features
3641

@@ -45,6 +50,11 @@ The worker service runs independently, handling moderation tasks asynchronously.
4550

4651
This decouples resource-intensive tasks from the main API server, ensuring optimal application responsiveness. The demo isn't doing anything very complicated, but you could easily run machine learning models [with access to GPUs](https://docs.defang.io/docs/tutorials/deploy-with-gpu) with Defang if you needed to.
4752

53+
### Django Admin
54+
55+
The Django admin is setup to quickly visualize messages and their moderation status. Access it at `/admin` with your superuser credentials: username `admin` and password `admin` setup by default when you first run or deploy.
56+
57+
4858
## Deploying with Defang
4959

5060
Deploying multi-service applications to cloud providers traditionally involves complex infrastructure setup, including configuring ECS clusters, security groups, networking, and more. Defang simplifies this significantly.
@@ -53,7 +63,7 @@ Deploying multi-service applications to cloud providers traditionally involves c
5363

5464
The Defang Playground lets you quickly preview your deployed app in a managed environment.
5565

56-
#### Secure Configuration
66+
**Secure Configuration**
5767

5868
Before deploying, securely set encrypted sensitive values:
5969

@@ -86,7 +96,8 @@ To deploy directly into your AWS account (or other [supported providers](https:/
8696
export DEFANG_PROVIDER=AWS
8797
export AWS_PROFILE=your-profile-name
8898
```
89-
#### Secure Configuration
99+
100+
**Secure Configuration**
90101

91102
Before deploying, securely set encrypted sensitive values in your cloud account:
92103

0 commit comments

Comments
 (0)