Skip to content

Commit 0b107aa

Browse files
committed
update readme
1 parent ab1c479 commit 0b107aa

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Starter Sample #REMOVE_ME_AFTER_EDITING
1+
# Django Channels & Redis & Postgres
22

33
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-django-channels-redis-template%26template_owner%3DDefangSamples)
44

5-
This is a sample that shows the rough structure of an actual Defang sample. This top paragraph should give a bit of context about the project and what it does. The rest of the README should be a guide on how to use the sample. #REMOVE_ME_AFTER_EDITING
5+
This sample demonstrates how to get Django Channels up and running with Redis and Postgres both managed by Defang. It demonstrates how to do this with a simple chat application.
66

77
## Prerequisites
88

@@ -15,32 +15,34 @@ This is a sample that shows the rough structure of an actual Defang sample. This
1515
To run the application locally, you can use the following command:
1616

1717
```bash
18-
# This might be `docker compose -f compose.dev.yaml up` depending on the project. #REMOVE_ME_AFTER_EDITING
19-
docker compose up
18+
docker compose -f compose.dev.yaml up
2019
```
2120

22-
## Configuration
23-
#REMOVE_ME_AFTER_EDITING - this section should be removed if there are no configuration values needed. The intro text can probably stay, but the list of configuration values should be updated/removed if there are none.
21+
This will start the Django server, Redis, and Postgres and mounts your Django app so you get live reloading. You can access the Django server at `http://localhost:8000`.
2422

23+
## Configuration
2524
For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration). Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.
2625

27-
### `API_KEY` #REMOVE_ME_AFTER_EDITING
28-
An explanation of what the env var (`API_KEY`) is, etc.
26+
### `POSTGRES_PASSWORD`
27+
The password for your Postgres database. You need to set this before deploying for the first time.
28+
29+
### `POSTGRES_URL`
30+
The URL for your Postgres database (which should include the password set with `POSTGRES_PASSWORD`). This should be in the format `postgres://<username>:<password>@<host>:<port>/<database>`
2931

3032

3133
## Deploying
3234

3335
1. Open the terminal and type `defang login`
34-
2. Use the [`defang config`](https://docs.defang.io/docs/concepts/compose#configuration) command to setup environment variables. #REMOVE_ME_AFTER_EDITING
36+
2. Use the [`defang config`](https://docs.defang.io/docs/concepts/compose#configuration) command to setup environment variables.
3537
3. Type `defang compose up` in the CLI.
3638
4. Your app will be running within a few minutes.
3739

3840
---
3941

40-
Title: Sample Title #REMOVE_ME_AFTER_EDITING
42+
Title: Django Channels & Redis & Postgres
4143

42-
Short Description: A short sentence or two describing the sample. #REMOVE_ME_AFTER_EDITING
44+
Short Description: A basic configuration of Django Channels with Redis and Postgres demonstrating a simple chat application.
4345

44-
Tags: Tags, That, Are, Not, Programming, Languages #REMOVE_ME_AFTER_EDITING
46+
Tags: Django, Channels, Redis, Postgres, Chat, Application
4547

46-
Languages: Programming, Languages, Used #REMOVE_ME_AFTER_EDITING
48+
Languages: Python

samples/django-channels-redis/compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Sample compose file. #REMOVE_ME_AFTER_EDITING
2-
31
services:
42
app:
53
# uncomment to add your own domain

0 commit comments

Comments
 (0)