remove redis

This commit is contained in:
JakkrapartXD 2026-01-12 03:36:54 +00:00
parent 646a10f45c
commit af58550f7f
10 changed files with 12 additions and 89 deletions

View file

@ -274,7 +274,6 @@ CREATE INDEX idx_courses_deleted ON courses(deleted_at) WHERE deleted_at IS NULL
### Query Optimization
- Use `SELECT` specific columns
- Implement pagination
- Cache course lists in Redis
- Use database views for complex queries
---

View file

@ -22,9 +22,9 @@
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Docker Compose Stack │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ PostgreSQL │ │ MinIO │ │ Redis │ │ │
│ │ │ Port: 5432 │ │ Port: 9000 │ │ Port: 6379 │ │ │
│ │ ┌────────────┐ ┌────────────┐ │ │
│ │ │ PostgreSQL │ │ MinIO │ │ │
│ │ │ Port: 5432 │ │ Port: 9000 │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
@ -52,22 +52,18 @@
- **Purpose**: File storage (videos, documents, images)
- **Access**: Backend + Developers
### 3. Redis - Cache & Session
- **Port**: 6379
- **Purpose**: Caching, session storage, queue
- **Access**: Backend only
### 4. Mailhog - Email Testing
### 3. Mailhog - Email Testing
- **Port**: 1025 (SMTP), 8025 (Web UI)
- **Purpose**: Catch all emails in development
- **Access**: All developers
### 5. Adminer - Database Management
### 4. Adminer - Database Management
- **Port**: 8080
- **Purpose**: Web-based database management
- **Access**: All developers
### 6. Forgejo - Git Server
### 5. Forgejo - Git Server
- **Port**: 3030 (HTTP), 2222 (SSH)
- **Purpose**: Self-hosted Git repository (like GitHub/GitLab)
- **Access**: All developers
@ -152,23 +148,6 @@ services:
networks:
- elearning-network
# Redis - Cache & Session Store
redis:
image: redis:7-alpine
container_name: elearning-redis
restart: unless-stopped
ports:
- "6379:6379"
command: redis-server --appendonly yes --requirepass dev_redis_password
volumes:
- redis_data:/data
networks:
- elearning-network
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 3s
retries: 5
# Mailhog - Email Testing
mailhog:
@ -226,8 +205,7 @@ volumes:
driver: local
minio_data:
driver: local
redis_data:
driver: local
forgejo_data:
driver: local
@ -296,8 +274,6 @@ docker-compose logs -f postgres
# Test PostgreSQL
docker exec -it elearning-postgres psql -U elearning -d elearning_dev -c "SELECT version();"
# Test Redis
docker exec -it elearning-redis redis-cli -a dev_redis_password ping
# Test MinIO
curl http://192.168.1.100:9000/minio/health/live
@ -391,11 +367,6 @@ DB_NAME=elearning_dev
DB_USER=elearning
DB_PASSWORD=dev_password_change_in_prod
# Redis
REDIS_URL=redis://:dev_redis_password@192.168.1.100:6379
REDIS_HOST=192.168.1.100
REDIS_PORT=6379
REDIS_PASSWORD=dev_redis_password
# MinIO/S3
S3_ENDPOINT=http://192.168.1.100:9000
@ -500,7 +471,7 @@ docker exec -it elearning-minio mc ls local/
| **PostgreSQL** | 192.168.1.100:5432 | elearning / dev_password_change_in_prod |
| **MinIO Console** | http://192.168.1.100:9001 | minioadmin / minioadmin123 |
| **MinIO API** | http://192.168.1.100:9000 | - |
| **Redis** | 192.168.1.100:6379 | Password: dev_redis_password |
| **Mailhog UI** | http://192.168.1.100:8025 | - |
| **Adminer** | http://192.168.1.100:8080 | - |
| **Forgejo** | http://192.168.1.100:3030 | Setup on first visit |
@ -647,4 +618,4 @@ docker-compose stop
- [Docker Compose Documentation](https://docs.docker.com/compose/)
- [PostgreSQL Documentation](https://www.postgresql.org/docs/)
- [MinIO Documentation](https://min.io/docs/)
- [Redis Documentation](https://redis.io/documentation)