Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

lxc-webpanel/lxc-rest

Repository files navigation

LXC Web Panel

RESTful API for LXC

Use it with Dashboard

Build Status codecov Python version


Installation

Clone

git clone --recursive https://github.com/lxc-webpanel/lxc-rest.git

Install requirements

apt install python3-lxc

cd lxc-rest
pip install -r requirements.txt

Create database

python3 install/setup.py

Run the server

Werkzeug (dev only)

python3 run.py

Gunicorn

gunicorn --bind :5000 app:app

uWSGI

uwsgi --socket :5000 --protocol=http --wsgi app:app

Usage

Requests

Set headers :

key value
Content-Type application/json
Authorization Bearer <token>

Documentation

or

Configuration

You can store instance configuration in instance/config.py

or

Set your own env var :

export LWP_CONFIG_FILE='/path/to/config/production.py'

Credits