mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-06 01:41:07 +02:00
Refactor: Move Docker files to project root and update documentation
Moved Dockerfile and docker-compose.yml from docker/ to root directory for simpler workflow. This allows running 'docker compose up' directly without -f flag. Changes: - Moved docker/Dockerfile -> Dockerfile - Moved docker/docker-compose.yml -> docker-compose.yml - Updated docker-compose.yml context and env_file paths - Updated README.md with simplified Docker commands - Updated CLAUDE_CODE_PROMPT.md project structure - Moved .claude/instructions.md to root (from technotes/) - Updated all documentation to reflect new structure Now deployment is simpler: docker compose up -d --build instead of: docker compose -f docker/docker-compose.yml up -d --build
This commit is contained in:
@@ -57,6 +57,8 @@ FLASK_PORT - Web server port (default: 5000)
|
||||
|
||||
```
|
||||
mc-webui/
|
||||
├── Dockerfile
|
||||
├── docker-compose.yml
|
||||
├── app/
|
||||
│ ├── main.py # Flask entry point
|
||||
│ ├── config.py # Environment config
|
||||
@@ -68,9 +70,6 @@ mc-webui/
|
||||
│ │ └── views.py # HTML views
|
||||
│ ├── static/ # CSS, JS
|
||||
│ └── templates/ # Jinja2 templates
|
||||
├── docker/
|
||||
│ ├── Dockerfile
|
||||
│ └── docker-compose.yml
|
||||
├── PRD.md # Full requirements doc
|
||||
└── README.md
|
||||
```
|
||||
@@ -107,5 +106,5 @@ POST /api/contacts/cleanup - Remove inactive contacts
|
||||
1. Develop locally (Windows/WSL)
|
||||
2. Push to GitHub
|
||||
3. Pull on server (192.168.131.80)
|
||||
4. Build and run with docker-compose
|
||||
4. Build and run: `docker compose up -d --build`
|
||||
5. Test on http://192.168.131.80:5000
|
||||
@@ -31,9 +31,8 @@ You are continuing development of **mc-webui** - a lightweight web interface for
|
||||
|
||||
```
|
||||
mc-webui/
|
||||
├── docker/
|
||||
│ ├── Dockerfile
|
||||
│ └── docker-compose.yml
|
||||
├── Dockerfile
|
||||
├── docker-compose.yml
|
||||
├── app/
|
||||
│ ├── __init__.py
|
||||
│ ├── main.py # Flask entry point
|
||||
|
||||
@@ -52,8 +52,7 @@ A lightweight web interface for meshcore-cli, providing browser-based access to
|
||||
|
||||
4. **Build and run**
|
||||
```bash
|
||||
# Run from the project root directory
|
||||
docker compose -f docker/docker-compose.yml up -d --build
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
5. **Access the web interface**
|
||||
@@ -87,9 +86,8 @@ See [.env.example](.env.example) for a complete example.
|
||||
|
||||
```
|
||||
mc-webui/
|
||||
├── docker/
|
||||
│ ├── Dockerfile # Docker image definition
|
||||
│ └── docker-compose.yml # Docker Compose configuration
|
||||
├── Dockerfile # Docker image definition
|
||||
├── docker-compose.yml # Docker Compose configuration
|
||||
├── app/
|
||||
│ ├── __init__.py
|
||||
│ ├── main.py # Flask entry point
|
||||
@@ -120,17 +118,17 @@ mc-webui/
|
||||
|
||||
## Development Status
|
||||
|
||||
🚧 **Current Phase: 0 - Environment Setup** ✅
|
||||
🚧 **Current Phase: 1 - Backend Basics** ✅
|
||||
|
||||
### Roadmap
|
||||
|
||||
- [x] Phase 0: Environment Setup
|
||||
- [ ] Phase 1: Backend Basics
|
||||
- [ ] Phase 2: Frontend Chat View
|
||||
- [ ] Phase 3: Message Sending
|
||||
- [ ] Phase 4: Auto-refresh
|
||||
- [ ] Phase 5: Contact Management
|
||||
- [ ] Phase 6: Polish & Documentation
|
||||
- [x] Phase 1: Backend Basics (REST API, message parsing, CLI wrapper)
|
||||
- [x] Phase 2: Frontend Chat View (Bootstrap UI, message display)
|
||||
- [x] Phase 3: Message Sending (Send form, reply functionality)
|
||||
- [x] Phase 4: Auto-refresh (60s polling, live updates)
|
||||
- [x] Phase 5: Contact Management (Cleanup modal)
|
||||
- [ ] Phase 6: Polish & Documentation (Testing, optimization)
|
||||
|
||||
See [PRD.md](PRD.md) for detailed requirements and implementation plan.
|
||||
|
||||
@@ -160,23 +158,21 @@ Access the settings panel to clean up inactive contacts:
|
||||
|
||||
## Docker Commands
|
||||
|
||||
**Note:** Run all commands from the project root directory (where .env file is located)
|
||||
|
||||
```bash
|
||||
# Start the application
|
||||
docker compose -f docker/docker-compose.yml up -d
|
||||
docker compose up -d
|
||||
|
||||
# View logs
|
||||
docker compose -f docker/docker-compose.yml logs -f
|
||||
docker compose logs -f
|
||||
|
||||
# Stop the application
|
||||
docker compose -f docker/docker-compose.yml down
|
||||
docker compose down
|
||||
|
||||
# Rebuild after code changes
|
||||
docker compose -f docker/docker-compose.yml up -d --build
|
||||
docker compose up -d --build
|
||||
|
||||
# Check container status
|
||||
docker compose -f docker/docker-compose.yml ps
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
@@ -193,10 +189,10 @@ sudo chmod 666 /dev/serial/by-id/usb-Espressif*
|
||||
### Container won't start
|
||||
```bash
|
||||
# Check logs
|
||||
docker-compose logs mc-webui
|
||||
docker compose logs mc-webui
|
||||
|
||||
# Verify .env file exists
|
||||
ls -la ../.env
|
||||
ls -la .env
|
||||
|
||||
# Check if port 5000 is available
|
||||
sudo netstat -tulpn | grep 5000
|
||||
|
||||
@@ -3,8 +3,8 @@ version: '3.8'
|
||||
services:
|
||||
mc-webui:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: mc-webui
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- FLASK_PORT=${FLASK_PORT:-5000}
|
||||
- FLASK_DEBUG=${FLASK_DEBUG:-false}
|
||||
env_file:
|
||||
- ../.env
|
||||
- .env
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"]
|
||||
interval: 30s
|
||||
Reference in New Issue
Block a user