English | Русский
A Django REST API service for managing Virtual Private Servers (VPS), allowing users to create, monitor, and control virtual servers.
- Create and manage virtual servers with configurable resources (CPU, RAM, HDD)
- Status management (start/stop/block servers)
- Resource usage tracking and limits
- API rate limiting and throttling
- OpenAPI documentation
- Containerized deployment with Docker
- Python 3.12+
- Docker and Docker Compose
- PostgreSQL 16
- Clone the repository:
git clone https://github.com/yourusername/django-vps-manager.git
cd django-vps-manager- Create and configure environment file:
cp .env.example .env- Start the services:
docker compose up --build -d-
Access the API:
- API Root: http://localhost:8000/api/v1/
- API Documentation:
- Swagger UI: http://localhost:8000/api/v1/swagger/
- ReDoc: http://localhost:8000/api/v1/redoc/
- OpenAPI Schema: http://localhost:8000/api/v1/schema.yaml
-
Demo User Access:
- Username: demo
- Password: demo123
- The demo user has superuser privileges for testing purposes
POST /api/v1/servers/- Create new VPSGET /api/v1/servers/- List all servers (with filtering)GET /api/v1/servers/{uid}/- Get server detailsPOST /api/v1/servers/{uid}/change_status/- Change server status
Run tests with:
docker compose exec server python manage.py test vpsThis project is licensed under the MIT License - see the LICENSE file for details.