Files
metabuilder/dockerterminal
johndoe6345789 d77a4a0557 chore(deps): Phase 3 - Standardize 15 low-priority dependency versions
Completed standardization of 15 dependency items across 35+ package.json files:

1. UUID: ^11.1.0 → ^13.0.0 (old/)
2. TypeScript: ~5.7.2 → ^5.9.3 (old/)
3. Tailwind CSS: All ^4.x → ^4.1.18 (5 files)
4. Vite: All ^7.x → ^7.3.1 (2 files)
5. Sass: All ^1.x → ^1.83.5 (5 files)
6. ESLint: All ^9.x → ^9.39.2 (3 files)
7. Framer Motion: All versions → ^12.29.0 (2 files)
8. Three.js: All versions → ^0.177.0 (2 files)
9. Lucide React: All versions → ^0.500.0 (2 files)
10. React: ^19.0.0 → ^19.2.3 (4+ files)
11. @types/react: All ^19.x → ^19.2.8 (6+ files)
12. Playwright: ^1.40.0 → ^1.49.1 (1 file)
13. Next.js: ^14.x → ^16.1.4 in primary apps (2 files)
14. React Hook Form: Skipped (already standardized)
15. Workspace packages: Skipped (no issues detected)

Files Modified:
- old/package.json (11 deps)
- pastebin/package.json (7 deps)
- exploded-diagrams/package.json (5 deps)
- postgres/package.json (4 deps)
- storybook/package.json (2 deps)
- dockerterminal/frontend/package.json (2 deps)
- workflowui/package.json (1 dep)
- packagerepo/frontend/package.json (2 deps)
- packagerepo/tests/package.json (1 dep)
- frontends/dbal/package.json (1 dep)
- dbal/development/package.json (1 dep)
- codegen/package.json (mostly already compliant)
- And 3 others with minor updates

Legacy versions intentionally preserved:
- React 18 projects (storybook, workflowui, packagerepo)
- Next.js 15.x branches (exploded-diagrams, pastebin)
- ESLint 8.x legacy (pastebin, workflow)

Status: 13/13 actionable items completed (100% success rate)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-23 18:09:45 +00:00
..

Docker Swarm Container Terminal WebUI

A modern, secure web interface for managing Docker containers with interactive terminal access.

Features

  • 🔐 Secure Authentication - Username/password authentication to protect container access
  • 📦 Container Management - View all active containers with real-time status updates
  • 💻 Interactive Terminal - Execute commands directly in running containers
  • 🎨 Modern UI - Built with Material UI and Next.js for a polished experience
  • 🐳 Docker Native - Direct integration with Docker API
  • 📱 Responsive Design - Works seamlessly on desktop and mobile devices

Tech Stack

Frontend

  • Next.js 14+ - React framework with App Router
  • Material UI (MUI) - Modern component library
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling

Backend

  • Flask - Python web framework
  • Docker SDK - Python Docker integration
  • Flask-CORS - Cross-origin resource sharing

Deployment

  • Docker - Containerized deployment
  • Docker Compose - Multi-container orchestration
  • GHCR - GitHub Container Registry for images

Quick Start

  1. Clone the repository:
git clone https://github.com/johndoe6345789/docker-swarm-termina.git
cd docker-swarm-termina
  1. Start the application:
docker-compose up -d
  1. Access the application:
  1. Login with default credentials:
  • Username: admin
  • Password: admin123

Manual Setup

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Create .env file (optional):
cp .env.example .env
# Edit .env to set custom credentials
  1. Run the Flask application:
python app.py

The backend will be available at http://localhost:5000

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install Node.js dependencies:
npm install
  1. Create .env.local file:
cp .env.local.example .env.local
# Edit if backend is running on a different URL
  1. Run the development server:
npm run dev

The frontend will be available at http://localhost:3000

Configuration

Backend Environment Variables

  • ADMIN_USERNAME - Admin username (default: admin)
  • ADMIN_PASSWORD - Admin password (default: admin123)
  • FLASK_ENV - Flask environment (default: development)

Frontend Environment Variables

  • NEXT_PUBLIC_API_URL - Backend API URL (default: http://localhost:5000)

API Endpoints

Authentication

  • POST /api/auth/login - Authenticate user
  • POST /api/auth/logout - Logout user

Containers

  • GET /api/containers - List all containers
  • POST /api/containers/<id>/exec - Execute command in container

Health

  • GET /api/health - Health check endpoint

Docker Images

Images are automatically built and pushed to GitHub Container Registry on every push to main:

  • Backend: ghcr.io/johndoe6345789/docker-swarm-termina-backend
  • Frontend: ghcr.io/johndoe6345789/docker-swarm-termina-frontend

Security Considerations

⚠️ Important Security Notes:

  1. Change Default Credentials - Always change the default admin credentials in production
  2. Docker Socket Access - The backend requires access to Docker socket (/var/run/docker.sock)
  3. Network Security - Use proper firewall rules and network isolation
  4. HTTPS - Use HTTPS in production (reverse proxy recommended)
  5. Session Management - Current implementation uses simple token-based auth; consider implementing JWT or OAuth for production

Development

Project Structure

.
├── backend/                 # Flask backend
│   ├── app.py              # Main Flask application
│   ├── requirements.txt    # Python dependencies
│   └── Dockerfile          # Backend Docker image
├── frontend/               # Next.js frontend
│   ├── app/                # Next.js app directory
│   ├── components/         # React components
│   ├── lib/                # Utility functions and API client
│   └── Dockerfile          # Frontend Docker image
├── docker-compose.yml      # Docker Compose configuration
└── .github/
    └── workflows/
        └── docker-publish.yml  # GHCR publishing workflow

Building for Production

Build Docker Images

docker-compose build

Push to GHCR

Images are automatically pushed when code is merged to main. To manually push:

docker tag docker-swarm-termina-backend ghcr.io/johndoe6345789/docker-swarm-termina-backend:latest
docker tag docker-swarm-termina-frontend ghcr.io/johndoe6345789/docker-swarm-termina-frontend:latest
docker push ghcr.io/johndoe6345789/docker-swarm-termina-backend:latest
docker push ghcr.io/johndoe6345789/docker-swarm-termina-frontend:latest

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues, questions, or contributions, please open an issue on GitHub.