Skip to content

Commit 41e3fe0

Browse files
committed
feat: add Redis configuration and update docker-compose for password authentication
- Added Redis password configuration to the .env.template file. - Updated the Redis service command in docker-compose to require the Redis password. - Enhanced README to include Redis setup instructions and password usage.
1 parent 69cfe1f commit 41e3fe0

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.env.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ POSTGRES_USER=admin
99
POSTGRES_PASSWORD=admin123
1010
POSTGRES_DB=pad
1111

12+
# Redis Configuration
13+
REDIS_PASSWORD=redis123
14+
1215
# Keycloak Configuration
1316
KEYCLOAK_ADMIN=admin
1417
KEYCLOAK_ADMIN_PASSWORD=admin123

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ This simplified example lets you host pad on `localhost` but is not safe for rea
5050
docker compose up -d postgres
5151
```
5252

53-
### 3️⃣ Keycloak 🔑
53+
### 3️⃣ Redis 🔄
54+
> In-memory data store for caching and session management with password authentication
55+
56+
* Run the Redis container with password authentication
57+
```bash
58+
docker compose up -d redis
59+
```
60+
* The Redis password is configured in your `.env` file using the `REDIS_PASSWORD` variable
61+
62+
### 4️⃣ Keycloak 🔑
5463
> OIDC provider for access and user management (within coder and pad app)
5564
* Run the Keycloak container
5665
```bash
@@ -78,7 +87,7 @@ This simplified example lets you host pad on `localhost` but is not safe for rea
7887
* **Important:** Tick `Email verified`
7988
* Go to the `Credentials` tab for the new user and set a password
8089

81-
### 4️⃣ Coder 🧑‍💻
90+
### 5️⃣ Coder 🧑‍💻
8291

8392
* **Find Docker Group ID:** You'll need this to grant necessary permissions
8493
```bash
@@ -119,7 +128,7 @@ This simplified example lets you host pad on `localhost` but is not safe for rea
119128
CODER_DEFAULT_ORGANIZATION=your_organization_id # Example: 70f6af06-ef3a-4b4c-a663-c03c9ee423bb
120129
```
121130
122-
### 5️⃣ Pad App 📝
131+
### 6️⃣ Pad App 📝
123132
> The fastAPI app that both serves the build frontend and the backend API to interface with Coder
124133
125134
* **Run the Application:**
@@ -139,8 +148,3 @@ This simplified example lets you host pad on `localhost` but is not safe for rea
139148
## 🚀 Project Growth
140149
141150
[![Star History Chart](https://api.star-history.com/svg?repos=pad-ws/pad.ws&type=Date)](https://star-history.com/#pad-ws/pad.ws&Date)
142-
143-
144-
145-
146-

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
volumes:
2222
- redis_data:/data
2323
restart: unless-stopped
24-
command: redis-server --save 60 1 --loglevel warning
24+
command: redis-server --requirepass ${REDIS_PASSWORD} --save 60 1 --loglevel warning
2525
network_mode: host
2626

2727
keycloak:
@@ -86,6 +86,7 @@ services:
8686
- POSTGRES_PORT=${POSTGRES_PORT}
8787
- REDIS_HOST=localhost
8888
- REDIS_PORT=6379
89+
- REDIS_PASSWORD=${REDIS_PASSWORD}
8990
- CODER_API_KEY=${CODER_API_KEY}
9091
- CODER_URL=http://localhost:${CODER_PORT}
9192
- CODER_TEMPLATE_ID=${CODER_TEMPLATE_ID}

0 commit comments

Comments
 (0)