{"id":49687560,"url":"https://github.com/random-iceberg/docker-compose","last_synced_at":"2026-05-07T10:44:59.451Z","repository":{"id":306148280,"uuid":"1024651355","full_name":"random-iceberg/docker-compose","owner":"random-iceberg","description":"A production-ready web application that predicts Titanic passenger survival using machine learning models","archived":false,"fork":false,"pushed_at":"2025-08-09T16:24:56.000Z","size":2980,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T18:15:42.123Z","etag":null,"topics":["docker-compose","ngix"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/random-iceberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-23T03:44:16.000Z","updated_at":"2025-08-09T16:24:59.000Z","dependencies_parsed_at":"2025-08-09T18:08:49.667Z","dependency_job_id":"7833c07f-00ab-4653-a9e2-9cb33b960059","html_url":"https://github.com/random-iceberg/docker-compose","commit_stats":null,"previous_names":["random-iceberg/docker-compose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/random-iceberg/docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-iceberg%2Fdocker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-iceberg%2Fdocker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-iceberg%2Fdocker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-iceberg%2Fdocker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/random-iceberg","download_url":"https://codeload.github.com/random-iceberg/docker-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-iceberg%2Fdocker-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32734387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","ngix"],"created_at":"2026-05-07T10:44:58.520Z","updated_at":"2026-05-07T10:44:59.440Z","avatar_url":"https://github.com/random-iceberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\n  \u003cimg src=\"https://github.com/user-attachments/assets/9a889962-2d09-46e7-b9ac-c16c856554e9\" alt=\"Titanic Survivor Prediction Banner\" width=\"600\"/\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA production-ready web application that predicts Titanic passenger survival using machine learning models\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/random-iceberg/docker-compose\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/GitHub-Docker_Compose-blue?style=flat-square\u0026logo=github\" alt=\"GitHub Repository\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.python.org/downloads/release/python-3130/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.13+-blue.svg?style=flat-square\u0026logo=python\u0026logoColor=white\" alt=\"Python 3.13+\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://reactjs.org/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/React-19+-61DAFB.svg?style=flat-square\u0026logo=react\u0026logoColor=white\" alt=\"React 19+\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.docker.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Docker-Enabled-2496ED.svg?style=flat-square\u0026logo=docker\u0026logoColor=white\" alt=\"Docker Enabled\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://fastapi.tiangolo.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/FastAPI-009688.svg?style=flat-square\u0026logo=fastapi\u0026logoColor=white\" alt=\"FastAPI\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 Quick Start (Zero Configuration)\n\n\u003e [!TIP]\n\u003e **One-Command Deployment** - The entire application stack can be deployed with a single command!\n\n### Production Deployment\n\n```bash\n# Clone with all submodules\ngit clone --recurse-submodules https://github.com/random-iceberg/docker-compose.git\ncd docker-compose\n\n# Start all services (production build)\ndocker compose up --build -d\n\n# Access the application\nopen http://localhost:8080\n```\n\n### Using Pre-built Images\n\n```bash\n# Use latest images from GitHub Container Registry\ndocker compose -f compose/compose.latest.yaml up --build --pull always -d\n\n# Access the application\nopen http://localhost:8080\n```\n\n\u003e [!IMPORTANT]\n\u003e **Default User Accounts**\n\u003e - **Admin**: `email=\"admin@test\"`, `password=\"apass\"`\n\u003e - **User**: `email=\"user@test\"`, `password=\"upass\"`\n\n---\n\n## 🏗️ Architecture Overview\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        A[Web Browser]\n    end\n    \n    subgraph \"Frontend Service\"\n        B[React SPA]\n        C[Nginx Reverse Proxy]\n    end\n    \n    subgraph \"Backend Services\"\n        D[FastAPI Web Backend]\n        E[FastAPI ML Service]\n    end\n    \n    subgraph \"Data Layer\"\n        F[PostgreSQL Database]\n        G[Model Artifacts Volume]\n    end\n    \n    subgraph \"Admin Tools\"\n        H[pgAdmin Dashboard]\n    end\n    \n    A --\u003e C\n    C --\u003e B\n    C --\u003e D\n    D --\u003e E\n    D --\u003e F\n    E --\u003e G\n    H --\u003e F\n    \n    style B fill:#61dafb\n    style D fill:#009688\n    style E fill:#009688\n    style F fill:#336791\n```\n\n| Service | Port | Technology | Purpose |\n|---------|------|------------|---------|\n| **Frontend** | 8080 | React + Nginx | User interface and reverse proxy |\n| **Backend** | 8000 | FastAPI | Authentication, business logic |\n| **Model** | 8001 | FastAPI | ML inference and training |\n| **Database** | 5432 | PostgreSQL | Data persistence |\n| **pgAdmin** | 5050 | pgAdmin4 | Database administration |\n\n---\n\n## ✨ Features\n\n### 🎯 Core Functionality\n- **Survival Prediction**: Real-time predictions based on passenger attributes\n- **Multiple ML Models**: Random Forest, SVM, Decision Tree, KNN, Logistic Regression\n- **Model Management**: Train, evaluate, and delete ML models\n- **User Authentication**: JWT-based secure authentication\n- **Admin Console**: Model training and management interface\n- **Prediction History**: Track user predictions (last 10 per user)\n\n### 🛡️ Security \u0026 Performance\n- **Role-Based Access Control**: Anonymous, User, and Admin roles\n- **Input Validation**: Comprehensive data validation and sanitization\n- **Health Checks**: Service monitoring and health endpoints\n- **Error Handling**: Structured error responses with correlation IDs\n- **Performance**: \u003c150ms prediction latency (local deployment)\n\n### 📱 User Experience\n- **Mobile-First Design**: Responsive across all devices\n- **Real-Time Updates**: Live prediction updates on input changes\n- **Accessible UI**: WCAG-compliant interface design\n- **Progressive Web App**: Modern web standards implementation\n\n---\n\n## 🛠️ Development Workflow\n\n### Development Environment\n\n```bash\n# Start development environment with hot reload\ndocker compose -f compose/compose.dev.yaml up -d --build\n\n# Access services:\n# - Frontend: http://localhost:8080 (with hot reload)\n# - Backend API: http://localhost:8000/docs\n# - Model API: http://localhost:8001/docs\n# - pgAdmin: http://localhost:5050\n```\n\n\u003e [!NOTE]\n\u003e **Development Features**\n\u003e - Hot module replacement for React\n\u003e - Auto-reload for FastAPI services\n\u003e - Live code synchronization\n\u003e - Development debugging tools\n\n### Service URLs\n\n| Service | Development | Production | Documentation |\n|---------|-------------|------------|---------------|\n| **Frontend** | http://localhost:8080 | http://localhost:8080 | - |\n| **Backend API** | http://localhost:8000/docs | http://localhost:8080/api/docs | Swagger UI |\n| **Model API** | http://localhost:8001/docs | Internal only | Swagger UI |\n| **pgAdmin** | http://localhost:5050 | http://localhost:5050 | Web Interface |\n\n---\n\n## 📁 Project Structure\n\n```\ndocker-compose/\n├── 📄 docker-compose.yaml          # Default (production) configuration\n├── 📁 compose/                     # Compose configurations\n│   ├── compose.dev.yaml            # Development with hot reload\n│   ├── compose.prod-local.yaml     # Production from local build\n│   └── compose.latest.yaml         # Production from registry\n├── 📁 app/                         # Application services (submodules)\n│   ├── 📁 frontend/                # React frontend (submodule)\n│   └── 📁 backend/                 # FastAPI backend (submodule)\n├── 📁 model/                       # ML service (submodule)\n├── 📁 docs/                        # Documentation (submodule)\n└── 📁 postgres/                    # Database initialization\n```\n\n### Git Submodules\n\n| Repository | Path | Description |\n|------------|------|-------------|\n| [web-frontend](https://github.com/random-iceberg/web-frontend) | `app/frontend/` | React TypeScript frontend |\n| [web-backend](https://github.com/random-iceberg/web-backend) | `app/backend/` | FastAPI web backend |\n| [model-backend](https://github.com/random-iceberg/model-backend) | `model/` | ML inference service |\n| [docker-compose.wiki](https://github.com/random-iceberg/docker-compose.wiki) | `docs/` | Project documentation |\n\n---\n\n## 🧪 Testing \u0026 Quality Assurance\n\n### Running Tests\n\n```bash\n# Backend tests\ncd app/backend\nuv run pytest --cov=. --cov-report=html\n\n# Frontend tests\ncd app/frontend\nnpm test\n\n# Model service tests\ncd model\nuv run pytest\n\n# Integration tests (Playwright)\nnpm run test:e2e\n```\n\n### Quality Metrics\n- **Test Coverage**: \u003e80% across all services\n- **Code Quality**: Ruff (Python), ESLint + Prettier (TypeScript)\n- **Type Safety**: Full TypeScript and Python type annotations\n- **API Documentation**: Auto-generated Swagger/OpenAPI specs\n\n---\n\n## 🐳 Docker Configurations\n\n### Available Configurations\n\n| Configuration | Use Case | Command |\n|---------------|----------|---------|\n| **Production (Local Build)** | Testing production build | `docker compose up` |\n| **Development** | Local development | `docker compose -f compose/compose.dev.yaml up` |\n| **Latest (Registry)** | Using pre-built images | `docker compose -f compose/compose.latest.yaml up` |\n\n### Environment Variables\n\n\u003e [!WARNING]\n\u003e **Security Notice**: Change default passwords in production deployments!\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `POSTGRES_PASSWORD` | `_postgres` | PostgreSQL root password |\n| `POSTGRES_PASSWORD_BACKEND` | `_backend` | Backend database password |\n| `JWT_SECRET_KEY` | `_ultrasecurejwtsecretkey` | JWT signing secret |\n| `PGADMIN_DEFAULT_EMAIL` | `team@random.iceberg` | pgAdmin login email |\n| `PGADMIN_DEFAULT_PASSWORD` | `Cheezus123` | pgAdmin login password |\n\n---\n\n## 📊 Machine Learning Models\n\n### Available Algorithms\n\n| Algorithm | ID | Use Case | Default Features |\n|-----------|----|---------| -----------------|\n| **Random Forest** | `rf` | High accuracy, interpretable | All features |\n| **Support Vector Machine** | `svm` | Non-linear patterns | All features |\n| **Decision Tree** | `dt` | Interpretable rules | All features |\n| **K-Nearest Neighbors** | `knn` | Simple, effective | All features |\n| **Logistic Regression** | `lr` | Baseline model | All features |\n\n### Features Used\n\nBased on the original Titanic dataset with feature engineering:\n- **Passenger Class** (1st, 2nd, 3rd)\n- **Sex** (Male, Female)\n- **Age** (0-100 years)\n- **Fare** (0-500 USD)\n- **Embarked** (Cherbourg, Queenstown, Southampton)\n- **Title** (Mr, Mrs, Miss, Master, Rare)\n- **Traveled Alone** (Boolean)\n- **Age × Class** (Interaction feature)\n\n---\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n\u003e [!TIP]\n\u003e **Port Conflicts**: If ports 8080, 8000, or 5432 are in use, modify the port mappings in the compose files.\n\n**Services not starting:**\n```bash\n# Check service logs\ndocker compose logs -f [service-name]\n\n# Restart specific service\ndocker compose restart [service-name]\n\n# Full cleanup and restart\ndocker compose down -v\ndocker compose up --build -d\n```\n\n**Database connection issues:**\n```bash\n# Check database health\ndocker compose exec postgres pg_isready -U backend -d backend\n\n# Reset database\ndocker compose down -v\ndocker compose up postgres -d\n```\n\n**Model training failures:**\n```bash\n# Check model service logs\ndocker compose logs -f model\n\n# Verify model files\ndocker compose exec model ls -la /data/models/\n```\n\n### Performance Optimization\n\n\u003e [!NOTE]\n\u003e **Resource Requirements**\n\u003e - **Minimum**: 4GB RAM, 2 CPU cores\n\u003e - **Recommended**: 8GB RAM, 4 CPU cores\n\u003e - **Storage**: ~2GB for images and data\n\n---\n\n## 🔗 Service Documentation\n\n| Service | Documentation | API Reference |\n|---------|---------------|---------------|\n| **Frontend** | [README](./app/frontend/README.md) | - |\n| **Backend** | [README](./app/backend/README.md) | [Swagger UI](http://localhost:8000/docs) |\n| **Model Service** | [README](./model/README.md) | [Swagger UI](http://localhost:8001/docs) |\n| **Project Docs** | [Documentation](./docs/) | - |\n\n---\n\n## 🎓 Academic Project\n\n\u003e [!NOTE]\n\u003e **University Project**: This application was developed as part of the **Software Engineering** course at **Deggendorf Institute of Technology (DIT)** under **Prof. Dr. Christoph Schober**.\n\n**Project Requirements Fulfilled:**\n- ✅ Containerized microservices architecture\n- ✅ RESTful API design with FastAPI\n- ✅ React single-page application\n- ✅ Machine learning model integration\n- ✅ User authentication and authorization\n- ✅ Responsive mobile-first design\n- ✅ Automated testing and CI/CD\n- ✅ Production-ready deployment\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eBuilt with ❤️ by Team Random Iceberg\u003c/strong\u003e\u003cbr\u003e\n  \u003cem\u003eDemonstrating modern full-stack development with AI/ML integration\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/random-iceberg\"\u003eGitHub Organization\u003c/a\u003e •\n  \u003ca href=\"./docs/Project-Requirements.md\"\u003eProject Requirements\u003c/a\u003e •\n  \u003ca href=\"./docs/Sprint-1.md\"\u003eDevelopment Sprints\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-iceberg%2Fdocker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandom-iceberg%2Fdocker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-iceberg%2Fdocker-compose/lists"}