Initial commit
Build and Push Multi-Arch Docker Image / build (push) Has been cancelled
Build and Push Multi-Arch Docker Image / build (push) Has been cancelled
This commit is contained in:
commit
8ce01cb00a
34 files changed
+8346
No files matched your search
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Entry point for WebSSH Backend.
|
||||
|
||||
This script starts the WebSSH server with all its components:
|
||||
- HTTP API server (login, connections, SFTP REST endpoints)
|
||||
- WebSocket SSH server (terminal access)
|
||||
- WebSocket SFTP server (file operations)
|
||||
- Periodic cleanup task for session recordings
|
||||
|
||||
Usage:
|
||||
python run.py
|
||||
|
||||
Environment variables:
|
||||
WEBSSH_USERS - Comma-separated user:pass pairs (default: admin:admin)
|
||||
JWT_SECRET - Secret key for JWT tokens (auto-generated if not set)
|
||||
MAX_UPLOAD_SIZE - Maximum file upload size (default: 100M)
|
||||
RECORDING_ENABLED - Enable session recording (default: true)
|
||||
RECORDING_RETENTION_DAYS - Days to keep recordings (default: 30)
|
||||
STORAGE_DIR - Directory for data storage (default: /data)
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add current directory to path for imports
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from webssh_backend.main import main
|
||||
from webssh_backend.config import logger
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
import asyncio
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
logger.info("Server stopped by user")
|
||||
except Exception as e:
|
||||
logger.error(f"Fatal error: {e}")
|
||||
sys.exit(1)
|
||||
Reference in new issue
Block a user