Skip to content

feat: add Docker and docker-compose support - #937

Open
Linhv14 wants to merge 10 commits into
NanmiCoder:mainfrom
Linhv14:feature/docker-support
Open

feat: add Docker and docker-compose support#937
Linhv14 wants to merge 10 commits into
NanmiCoder:mainfrom
Linhv14:feature/docker-support

Conversation

@Linhv14

@Linhv14 Linhv14 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Add complete Docker and docker-compose support for MediaCrawler, enabling easy deployment and development in containerized environments.

Changes

  • Dockerfile.backend: FastAPI server container (Python 3.11-slim)

    • Installs uv package manager
    • Syncs Python dependencies
    • Configured health checks
    • Optimal image size (~1.2GB)
  • Dockerfile.frontend: React SPA container (Node.js 20-alpine)

    • Multi-stage build for minimal image size
    • Builds React app with Vite
    • Serves static files with serve
    • Configured health checks
    • Optimal image size (~200MB)
  • docker-compose.yml: Service orchestration

    • Both services with health checks
    • Automatic service restart
    • Network isolation
    • Volume mounts for development
  • DOCKER.md: Comprehensive documentation

    • Quick start guide
    • Common commands
    • Development workflow
    • Production deployment tips
    • Troubleshooting section
  • .env.docker.example: Environment configuration template

  • .dockerignore: Build context optimization

Benefits

✅ No local Python/Node.js installation needed
✅ Consistent development and production environments
✅ Easy deployment and scaling
✅ Automatic health checks and restart
✅ Development volume mounts for live reload
✅ Production-ready configuration

Testing

  • ✅ Both services build successfully
  • ✅ Services start and reach healthy state
  • ✅ Backend health check responds correctly
  • ✅ Frontend loads successfully
  • ✅ Service restart policy works

Usage

```bash
docker-compose up --build
```

Access:

NanmiCoder and others added 5 commits July 9, 2026 17:35
- 三个 README(中/英/西)的赞助商展示区改为左 logo、右文案的两列表格,更紧凑
- 新增 Bloome 赞助商条目
- logo 与文案品牌名均可点击跳转对应链接
- TikHub 文案补充可点击链接
- Create locales/vi-VN with 6 JSON files (common, config, data, env, terminal, license)
- Translate all UI text to Vietnamese
- Update i18n config to support vi-VN language
- Set Vietnamese as default fallback language
- Add Vietnamese to LanguageSwitch component
- Build successful, no errors
…eployment

- Add Dockerfile.backend for FastAPI Python 3.11 backend server
- Add Dockerfile.frontend for React Node.js 20 frontend SPA (multi-stage build)
- Add docker-compose.yml with both services orchestration
- Configure health checks for both backend and frontend services
- Add service restart policy for production reliability
- Add .dockerignore to optimize build context size
- Add DOCKER.md with comprehensive setup and usage guide
- Add .env.docker.example for environment variable reference
- Backend runs on port 8080, frontend on port 3000
- Both services configured with restart: unless-stopped
- Tested and verified both services running successfully
- Compatible with Docker Desktop and Docker Engine

Usage:
  docker-compose up --build

Access:
  Frontend: http://localhost:3000
  Backend: http://localhost:8080
  API Docs: http://localhost:8080/docs
@Linhv14
Linhv14 requested a review from NanmiCoder as a code owner July 14, 2026 05:55
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Jul 14, 2026
Linhv14 added 5 commits July 14, 2026 13:15
- Prevent 'Cannot read properties of undefined' error when status is undefined
- Add fallback value 'IDLE' for status display
- Ensures safe rendering when crawler store is not fully initialized
- Add ShortVideo-Requirements.md: Detailed requirements for YouTube Shorts, Facebook Reels, TikTok
  - Monetization conditions
  - Video format specifications
  - CPM and revenue information
  - Time to monetize

- Add ShortVideo-Guideline.md: Best practices and workflow for short video creation
  - Golden video length: 45 seconds
  - Hook flow (3 types of hooks)
  - 45-second video structure
  - Production techniques and tips
  - Engagement strategies
  - Posting strategy
  - Metrics to track
  - Pre-upload checklist

- All documentation in Vietnamese
- Living documents: will be updated continuously based on discussions
- Translate FAQ (常见问题.md) → FAQ-VietNam.md
- Translate Architecture (项目架构文档.md) → Kien-Truc-Du-An.md
- Translate Environment Management (原生环境管理文档.md) → Quan-Ly-Moi-Truong.md

All documentation now available in Vietnamese (tiếng Việt 100%)
- data_storage_guide.md → Huong-Dan-Luu-Tru-Du-Lieu.md
- excel_export_guide.md → Huong-Dan-Xuat-Excel.md
- index.md → Trang-Chu.md

3/13 remaining files translated
- Huong-Dan-CDP-Mode.md (CDP guide)
- Huong-Dan-Su-Dung-Proxy.md (Proxy usage)
- Gioi-Thieu-Tac-Gia.md (Author info)
- Nhom-WeChat.md (WeChat group)
- Huong-Dan-KuaiDaiLi.md (KuaiDaiLi proxy)
- Huong-Dan-Dang-Nhap-Sdt.md (Phone login)
- Danh-Sach-Ung-Ho.md (Supporters list)
- Gioi-Thieu-Dich-Vu-Tra-Phi.md (Pro version)
- Cau-Hinh-Word-Cloud.md (Word cloud setup)
- Huong-Dan-WanDou-HTTP.md (WanDou HTTP proxy)
- Cau-Truc-Ma-Du-An.md (Code structure)

All docs now translated to Vietnamese (100% tiếng Việt)
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants