chore: Remove Dockerfile and docker-compose.yml, update README and migration guide for backend log checks
Some checks failed
Documentation / build-docs (push) Has been cancelled
Tests / test (macos-latest, 3.11) (push) Has been cancelled
Tests / test (macos-latest, 3.12) (push) Has been cancelled
Tests / test (macos-latest, 3.13) (push) Has been cancelled
Tests / test (macos-latest, 3.14) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.14) (push) Has been cancelled
Some checks failed
Documentation / build-docs (push) Has been cancelled
Tests / test (macos-latest, 3.11) (push) Has been cancelled
Tests / test (macos-latest, 3.12) (push) Has been cancelled
Tests / test (macos-latest, 3.13) (push) Has been cancelled
Tests / test (macos-latest, 3.14) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.14) (push) Has been cancelled
This commit is contained in:
@@ -8,7 +8,6 @@ The application has been migrated from PyQt6 desktop app to a modern web-based a
|
||||
|
||||
- **Frontend**: React + TypeScript + Material-UI
|
||||
- **Backend**: FastAPI (Python)
|
||||
- **Deployment**: Docker
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -52,17 +51,6 @@ The application has been migrated from PyQt6 desktop app to a modern web-based a
|
||||
- API Docs: http://localhost:8000/docs
|
||||
- API: http://localhost:8000/api
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
1. **Build and Run**:
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
2. **Access Application**:
|
||||
- Application: http://localhost:8000
|
||||
- API Docs: http://localhost:8000/docs
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Trading
|
||||
@@ -114,24 +102,9 @@ VITE_WS_URL=ws://localhost:8000/ws/
|
||||
DATABASE_URL=sqlite:///./data/crypto_trader.db
|
||||
```
|
||||
|
||||
### Docker Environment
|
||||
|
||||
Environment variables can be set in `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- DATABASE_URL=sqlite:///./data/crypto_trader.db
|
||||
- PYTHONPATH=/app
|
||||
```
|
||||
|
||||
## Data Persistence
|
||||
|
||||
Data is stored in the `./data` directory, which is mounted as a volume in Docker:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
```
|
||||
Data is stored in the `~/.local/share/crypto_trader/` directory following XDG Base Directory Specification.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -168,23 +141,6 @@ volumes:
|
||||
|
||||
## Production Deployment
|
||||
|
||||
### Docker Production
|
||||
|
||||
1. Build production image:
|
||||
```bash
|
||||
docker build -t crypto-trader:latest .
|
||||
```
|
||||
|
||||
2. Run container:
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 8000:8000 \
|
||||
-v $(pwd)/data:/app/data \
|
||||
-v $(pwd)/config:/app/config \
|
||||
--name crypto-trader \
|
||||
crypto-trader:latest
|
||||
```
|
||||
|
||||
### Reverse Proxy (Nginx)
|
||||
|
||||
Example Nginx configuration:
|
||||
@@ -228,9 +184,9 @@ Only the UI layer has been replaced with a web interface.
|
||||
|
||||
### Backend Issues
|
||||
|
||||
- **Port already in use**: Change port in `docker-compose.yml` or use `--port` flag
|
||||
- **Database errors**: Check database file permissions in `./data` directory
|
||||
- **Import errors**: Ensure `PYTHONPATH=/app` is set
|
||||
- **Port already in use**: Use `--port` flag to specify a different port
|
||||
- **Database errors**: Check database connection string and permissions
|
||||
- **Import errors**: Ensure virtual environment is activated and dependencies are installed
|
||||
|
||||
### Frontend Issues
|
||||
|
||||
@@ -238,20 +194,13 @@ Only the UI layer has been replaced with a web interface.
|
||||
- **WebSocket connection fails**: Verify WebSocket URL and backend is running
|
||||
- **Build errors**: Clear `node_modules` and reinstall: `rm -rf node_modules && npm install`
|
||||
|
||||
### Docker Issues
|
||||
|
||||
- **Build fails**: Check Dockerfile syntax and dependencies
|
||||
- **Container won't start**: Check logs: `docker-compose logs`
|
||||
- **Volume permissions**: Ensure `./data` directory is writable
|
||||
|
||||
## Benefits of Web Architecture
|
||||
|
||||
1. **Modern UI**: Access to entire web ecosystem (Material-UI, charts, etc.)
|
||||
2. **Cross-platform**: Works on any device with a browser
|
||||
3. **Easier deployment**: Docker is simpler than AppImage
|
||||
4. **Better development**: Hot-reload, better tooling
|
||||
5. **Maintainability**: Easier to update and deploy
|
||||
6. **Accessibility**: Access from anywhere via browser
|
||||
3. **Better development**: Hot-reload, better tooling
|
||||
4. **Maintainability**: Easier to update and deploy
|
||||
5. **Accessibility**: Access from anywhere via browser
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@ crypto_trader/
|
||||
│ ├── pages/ # Page components
|
||||
│ ├── api/ # API client
|
||||
│ └── ...
|
||||
├── src/ # Existing Python code (unchanged)
|
||||
└── docker-compose.yml
|
||||
└── src/ # Existing Python code (unchanged)
|
||||
```
|
||||
|
||||
## What Was Preserved
|
||||
@@ -67,7 +66,6 @@ crypto_trader/
|
||||
- **UI Layer**: PyQt6 widgets → React components
|
||||
- **Communication**: Direct function calls → HTTP API
|
||||
- **Real-time Updates**: Signal/slot → WebSocket
|
||||
- **Deployment**: AppImage → Docker
|
||||
|
||||
## Migration Steps
|
||||
|
||||
@@ -92,13 +90,6 @@ Created React frontend with:
|
||||
- TypeScript for type safety
|
||||
- WebSocket for real-time updates
|
||||
|
||||
### 3. Docker Deployment
|
||||
|
||||
Created Docker setup for easy deployment:
|
||||
- Multi-stage build (frontend + backend)
|
||||
- Single container deployment
|
||||
- Volume mounts for data persistence
|
||||
|
||||
## Running the New Architecture
|
||||
|
||||
### Development
|
||||
@@ -116,13 +107,7 @@ Created Docker setup for easy deployment:
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Production
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
Access at: http://localhost:8000
|
||||
Access at: http://localhost:3000 (frontend) and http://localhost:8000 (API)
|
||||
|
||||
## API Endpoints
|
||||
|
||||
@@ -194,10 +179,9 @@ const { lastMessage } = useWebSocket('ws://localhost:8000/ws/')
|
||||
|
||||
1. **Modern UI**: Access to entire web ecosystem
|
||||
2. **Cross-platform**: Works on any device
|
||||
3. **Easier deployment**: Docker vs AppImage
|
||||
4. **Better development**: Hot-reload, better tooling
|
||||
5. **Maintainability**: Easier to update
|
||||
6. **Accessibility**: Access from anywhere
|
||||
3. **Better development**: Hot-reload, better tooling
|
||||
4. **Maintainability**: Easier to update
|
||||
5. **Accessibility**: Access from anywhere
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
@@ -219,4 +203,4 @@ The existing Python code remains unchanged. You can still:
|
||||
For issues or questions:
|
||||
- Check API docs: http://localhost:8000/docs
|
||||
- Review deployment guide: `docs/deployment/web_architecture.md`
|
||||
- Check backend logs: `docker-compose logs`
|
||||
- Check backend logs in the terminal where uvicorn is running
|
||||
|
||||
Reference in New Issue
Block a user