Production-grade deployment of a federated Reddit alternative built to demonstrate real-world DevOps practices.
This project deploys Lemmy — an open-source, federated social platform — using a fully containerized, production-ready stack. Every component is wired together with health checks, resource limits, and a reverse proxy, mirroring how real-world services are run in production.
┌─────────────────────────────┐
│ Docker Network │
│ │
HTTP :80 │ ┌──────────────────────┐ │
User ─────────────────► │ │ Nginx (Proxy) │ │
│ └───────────┬──────────┘ │
│ │ │
│ ┌─────────┴─────────┐ │
│ ▼ ▼ │
│ ┌──────────┐ ┌─────────────┐│
│ │ lemmy-ui │ │ lemmy ││
│ │ :1234 │ │ :8536 ││
│ └──────────┘ └──────┬──────┘│
│ │ │
│ ┌──────────┴──────┐ │
│ ▼ ▼ │
│ ┌─────────┐ ┌────────┐ │
│ │postgres │ │pictrs │ │
│ │ :5432 │ │ :8080 │ │
│ └─────────┘ └────────┘ │
└─────────────────────────────┘
| Layer | Technology | Purpose |
|---|---|---|
| Containerization | Docker + Compose | Service orchestration |
| Reverse Proxy | Nginx Alpine | Routing + load balancing |
| Backend | Lemmy (Rust) | API + federation |
| Frontend | Lemmy-UI (Node) | Web interface |
| Database | PostgreSQL 16 | Persistent storage |
| Media | pictrs | Image processing |
- Docker >= 24.0
- Docker Compose >= 2.0
# 1. Clone
git clone https://github.com/YOUR_USERNAME/lemmy-devops.git
cd lemmy-devops
# 2. Set permissions
mkdir -p volumes/pictrs volumes/postgres
sudo chown -R 991:991 volumes/pictrs
# 3. Start
docker compose up -d
# 4. Verify
docker ps --format "{{.Names}}: {{.Status}}"Open http://localhost in your browser.
lemmy-devops/
├── 📄 docker-compose.yml # Orchestration + health checks
├── 📄 nginx_internal.conf # Reverse proxy routing rules
├── 📄 lemmy.hjson # Lemmy backend configuration
├── 📁 volumes/
│ ├── postgres/ # Database persistent data
│ └── pictrs/ # Media storage
└── 📁 .github/
└── workflows/ # CI/CD pipelines (Sprint 2)
All services are configured with Docker health checks:
docker ps --format "{{.Names}}: {{.Status}}"Expected output:
lemmy-proxy-1: Up X minutes (healthy)
lemmy-lemmy-1: Up X minutes (healthy)
lemmy-lemmy-ui-1: Up X minutes (healthy)
lemmy-pictrs-1: Up X minutes (healthy)
lemmy-postgres-1: Up X minutes (healthy)
| Sprint | Focus | Status |
|---|---|---|
| Sprint 1 | Docker + Compose + Nginx | ✅ Done |
| Sprint 2 | GitHub Actions CI/CD | 🔄 In Progress |
| Sprint 3 | Kubernetes + Helm | ⏳ Upcoming |
| Sprint 4 | Prometheus + Grafana | ⏳ Upcoming |
Built with ❤️ as part of a DevOps learning journey