Core library for SVS (https://svs.kristn.co.uk/)
Project description
Self-Hosted Virtual Stack
SVS is an open-source python library for managing self-hosted services on a linux server.
CI:
Docs
For full docs, visit svs.kristn.co.uk
This readme contains a quick summary and development setup info.
Goals
The goal of this project is to simplify deploying and managing self-hosted applications on a linux server. Inspired by Portainer but aimed at begginer users. Under the hood, all applications are containerized using Docker. For ease of use, the library provides pre-configured service templates for popular self-hosted applications such as:
- MySQL
- PostgreSQL
- Django
- NGINX
- ...
Technology overview
Every service will run a Docker container and all of users' services will be on the same Docker network, allowing them to communicate with each other easily without
- exposing them to other users on the same server
- having to use compose stacks and custom networks to allow cross-service communication.
Features
Currently, the library is in early development and has the following features:
- User management
- Docker network management
- Service management
- Service templates
- CI/CD integration
- DB/System sync issues + recovery
- Remote SSH access
Running locally
Given this repository accesses system files, creates docker containers and manages services and is designed strictly for linux servers, it is recommended to run in a virtual environment.
The easiest way to achieve a reproducible environment is to use the included devcontainer configuration. Devcontainers allow you to run a containerized development environment with all dependencies installed. See the devcontainer documentation.
The local devcontainer config creates the following compose stack:
- A
pythondevcontainer for the development environment. - A
postgresdatabase container for storing service data. - A
caddycontainer to act as a HTTP proxy (needed only if testing domains locally)
This guide assumes you have chosen to use the devcontainer setup.
Starting the devcontainer
To start the devcontainer, open the repository in Visual Studio Code and select "Reopen in Container" from the command palette. This will build the container and start it.
After attaching to the devcontainer, the dependencies will be automatically installed. After that's done, you can launch a new terminal which will have the virtual environment activated automatically.
You also need to run the install-dev.sh script to configure your system for development. This script will create the required directories and configure permissions. It is a subset of the production install script.
After running the install script, switch to the svs-admins group by running
newgrp svs-admins
Linting + Formatting
The devcontainer includes pre-configured linting and formatting tools for Visual Studio Code and all files should be formatted on save. If you use a different editor, you can run the pre-commit hooks manually by running pre-commit run --all-files in the terminal to apply the formatting and linting rules.
Running the tests
To run the tests, you can use the pytest command in the terminal. This will run all tests in the tests directory. You can also run individual test files or functions by specifying their paths.
Tests are split into unit, integration and cli tests. They can be run separately by using the -m flag with pytest:
pytest -m unit
pytest -m integration
pytest -m cli
Running the docs
Python docstrings are used throughout the codebase to generate documentation. To generate the documentation, you can use the zensical command in the terminal. This will build the documentation and serve it locally.
To run the documentation server, you can use the following command:
zensical serve
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svs_core-0.14.3.tar.gz.
File metadata
- Download URL: svs_core-0.14.3.tar.gz
- Upload date:
- Size: 65.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
500d775fb2a108f9b04f8f49386a4b110010a904d277c81ac2fe495bcb711c2e
|
|
| MD5 |
8880085a103fa287453be42f04ec53ab
|
|
| BLAKE2b-256 |
c4aa1d0e378bb12f0b83a1137cdf82e8eab30d0b5595323bdf568b2a74689e64
|
Provenance
The following attestation bundles were made for svs_core-0.14.3.tar.gz:
Publisher:
publish.yml on kristiankunc/svs-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
svs_core-0.14.3.tar.gz -
Subject digest:
500d775fb2a108f9b04f8f49386a4b110010a904d277c81ac2fe495bcb711c2e - Sigstore transparency entry: 1191481019
- Sigstore integration time:
-
Permalink:
kristiankunc/svs-core@b882054b66858be76f07e6044b53294a6295e904 -
Branch / Tag:
refs/tags/v0.14.3 - Owner: https://github.com/kristiankunc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b882054b66858be76f07e6044b53294a6295e904 -
Trigger Event:
release
-
Statement type:
File details
Details for the file svs_core-0.14.3-py3-none-any.whl.
File metadata
- Download URL: svs_core-0.14.3-py3-none-any.whl
- Upload date:
- Size: 76.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a178325e36edfd2343e61b41a000b16b699ad61360d2b52484cf3076c2359bce
|
|
| MD5 |
71e9b487c1407e1369b85bad44dc08ec
|
|
| BLAKE2b-256 |
8de97b30ba540fae583d203f97f6b22fbbad6bb7c25284427c42ffb812989a7f
|
Provenance
The following attestation bundles were made for svs_core-0.14.3-py3-none-any.whl:
Publisher:
publish.yml on kristiankunc/svs-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
svs_core-0.14.3-py3-none-any.whl -
Subject digest:
a178325e36edfd2343e61b41a000b16b699ad61360d2b52484cf3076c2359bce - Sigstore transparency entry: 1191481020
- Sigstore integration time:
-
Permalink:
kristiankunc/svs-core@b882054b66858be76f07e6044b53294a6295e904 -
Branch / Tag:
refs/tags/v0.14.3 - Owner: https://github.com/kristiankunc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b882054b66858be76f07e6044b53294a6295e904 -
Trigger Event:
release
-
Statement type: