Skip to content

bongodevs/rustalink-config-server

Repository files navigation

Rustalink Config Server

A lightweight, high-performance configuration server written in Rust, designed to serve and merge TOML configurations from a private Git repository.

Features

  • Profile-based Merging: Automatically merges config.toml (base) and config.{profile}.toml (overrides).
  • Safe Multi-tenancy: Serves configurations directly from the root of a Git repository.
  • Git Backend: Automatic cloning and synchronization with private GitHub repositories using Personal Access Tokens (PAT).
  • Basic Authentication: Secure your configuration endpoints.
  • Fast & Efficient: Built on axum and tokio.

API Endpoints

Get Merged Configuration

GET /{profile} Returns the merged TOML content of config.toml and config.{profile}.toml. Authentication: Basic Auth required.

Health Check

GET /health Returns OK if the server is running.

Configuration

The server is configured via server_config.toml in the root directory:

[server]
port = 8888

[auth]
username = "your_username"
password = "your_password"

[git]
enabled = true
uri = "https://github.com/YourOrg/your-config-repo"
username = "your-github-username"
token = "your-github-pat"
branch = "main" # Optional, defaults to "main"

Running the Server

Using Cargo

cargo run --release

Using Docker

docker build -t rustalink-config-server .
docker run -p 8888:8888 rustalink-config-server

Integration with Rustalink

Add the following to your Rustalink config.toml:

[config_server]
url = "http://your-server-ip:8888/local" # Replace with your server IP and port, after that add /profile
username = "your_username"
password = 'your_password' # Use single quotes if password contains special characters like $

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors