Arne Baeumler dbc53068a2
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m8s
update requirements.txt
2026-01-10 17:04:08 +01:00
2026-01-10 16:58:16 +01:00
2026-01-10 16:58:16 +01:00
2026-01-10 16:58:16 +01:00
2023-08-22 18:25:56 +02:00
2026-01-10 16:58:16 +01:00
2026-01-10 17:04:08 +01:00
2023-08-22 18:25:56 +02:00

WebVars

WebVars is a lightweight Flask application for storing and retrieving configuration variables. It supports namespacing by project and uses SQLite for persistence.

Features

  • Simple API: Get and set variables via HTTP GET requests.
  • Namespacing: Organize variables by namespace and project.
  • Dockerized: Ready to deploy with Docker and Docker Compose.

API Usage

Set a Variable

To set a variable, make a GET request to the following pattern: GET /<namespace>/<project>/<name>/<value>

Example:

curl http://localhost:8080/dev/backend/api_key/secret123

Get a Variable

To retrieve a variable, make a GET request to: GET /<namespace>/<project>/<name>

Example:

curl http://localhost:8080/dev/backend/api_key

Deployment

Using Docker Compose

The easiest way to run WebVars is with Docker Compose.

  1. Start the service:

    docker compose up -d
    

    The service will be available at http://localhost:8080.

  2. Persistence: The docker-compose.yml is configured to mount a local webvars.db file to /app/webvars.db inside the container. It is recommended to create this file before starting the container to ensure it is treated as a file, not a directory.

    touch webvars.db
    docker compose up -d
    

Using Docker CLI

You can also build and run the container manually.

  1. Build the image:

    docker build -t webvars .
    
  2. Run the container:

    touch webvars.db
    docker run -d \
      -p 8080:80 \
      -v $(pwd)/webvars.db:/app/webvars.db \
      --name webvars \
      webvars
    
Description
No description provided
Readme GPL-2.0 41 KiB
Languages
Python 69.2%
Dockerfile 30.8%