All Projects → reddec → trusted-cgi

reddec / trusted-cgi

Licence: MIT license
Lightweight runner for lambda functions/apps in CGI like mode

Programming Languages

go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to trusted-cgi

osmosfeed
Turn GitHub into an RSS reader
Stars: ✭ 839 (+459.33%)
Mutual labels:  self-hosted
Self-Hosted-Asp.Net-WebHooks
Self hosted custom webhook receiver and sender
Stars: ✭ 50 (-66.67%)
Mutual labels:  self-hosted
RSS-to-Telegram-Bot
A Telegram RSS bot that cares about your reading experience
Stars: ✭ 482 (+221.33%)
Mutual labels:  self-hosted
nextcloud docker
Docker setup to run Nextcloud
Stars: ✭ 35 (-76.67%)
Mutual labels:  self-hosted
.oh-my-comma
The idea of a 'workbench for developers' - Shell utilities, tooling, and dotfiles for comma.ai's open-source self-driving car technology stack
Stars: ✭ 110 (-26.67%)
Mutual labels:  self-hosted
koillection
Koillection is a self-hosted service allowing users to manage any kind of collections.
Stars: ✭ 259 (+72.67%)
Mutual labels:  self-hosted
fregata
A self hosted REST API for message delivery
Stars: ✭ 19 (-87.33%)
Mutual labels:  self-hosted
simply-nzedb
The simplest way to get nZEDb up and running with docker
Stars: ✭ 67 (-55.33%)
Mutual labels:  self-hosted
self-hosted
Deploy Revolt using Docker.
Stars: ✭ 490 (+226.67%)
Mutual labels:  self-hosted
finance
💰 Free open-source personal finance tracking web application.
Stars: ✭ 156 (+4%)
Mutual labels:  self-hosted
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+191.33%)
Mutual labels:  self-hosted
go-dcgi
CGI, but with Docker containers
Stars: ✭ 12 (-92%)
Mutual labels:  cgi
newsdash
A news dashboard inspired by iGoogle and Netvibes
Stars: ✭ 44 (-70.67%)
Mutual labels:  self-hosted
rebacklogs
Re:Backlogs is an Open Source Project Management Tool.
Stars: ✭ 163 (+8.67%)
Mutual labels:  self-hosted
nanoblog
Open source microblog with buffering and Twitter crossposting
Stars: ✭ 23 (-84.67%)
Mutual labels:  self-hosted
subplayer
A music player frontend compatible with Subsonic backends
Stars: ✭ 66 (-56%)
Mutual labels:  self-hosted
Minecraft Server Emulator
Minecraft Server Emulator
Stars: ✭ 24 (-84%)
Mutual labels:  self-hosted
onionjuggler
Manage your Onion Services via CLI or TUI on Unix-like operating system with a POSIX compliant shell.
Stars: ✭ 31 (-79.33%)
Mutual labels:  self-hosted
notesnook
A fully open source & end-to-end encrypted note taking alternative to Evernote.
Stars: ✭ 5,098 (+3298.67%)
Mutual labels:  self-hosted
dyndnsd
A small, lightweight and extensible DynDNS server written with Ruby and Rack.
Stars: ✭ 69 (-54%)
Mutual labels:  self-hosted

Trusted-CGI

license donate

Lightweight self-hosted lambda/applications/cgi/serverless-functions engine.

see docs

Features:

  • No specific requirements: just one binary. Working "as-is"
  • One-click new lambda with public link and handler. Available immediately.
  • Rich API
  • Security: user switch, IP restrictions, Origin restrictions, tokens ....
  • Time limits
  • Permanent links (aliases)
  • Actions - independent instruction that could be run via UI/API on server
  • Scheduler: run actions in cron-tab like style
  • Queues and retries
  • ... etc - see docs

P.S

There is minimal version of trusted-cgi: nano-run. Check it out - it DevOps friendly with configuration-first approach (ie easier to use for infrastructure-as-a-code).

Installation

Since 0.3.3 Linux, Darwin and even Windows OS supported: pre-built binaries could be found in releases

TL;DR;

  • for production for debian servers - use bintray repository github release (recommend)
  • locally or non-debian server - download binary and run
  • for quick tests or for limited production - use docker image (docker run --rm -p 3434:3434 reddec/trusted-cgi)

See installation manual

Overview

The process flow is quite straightforward: one light daemon in background listens for requests and launches scripts/apps on demand. An executable shall read standard input (stdin) for request data and write a response to standard output (stdout).

Technically any script/application that can parse STDIN and write something to STDOUT should be capable of the execution.

Trusted-cgi designed keeping in mind that input and output data is quite small and contains structured data (json/xml), however, there are no restrictions on the platform itself.

Key differences with classic CGI:

  • Only request body is being piped to scripts input (CGI pipes everything, and application has to parse it by itself - it could be very not trivial and slow (it depends))
  • Request headers, form fields, and query params are pre-parsed by the platform and can be passed as an environment variable (see mapping)
  • Response headers are pre-defined in manifest

Due to changes, it's possible to make the simplest script with JSON input and output like this:

import sys
import json

request = json.load(sys.stdin) # read and parse request
response = ['hello', 'world']  # do some logic and make response
json.dump(response, sys.stdout)  # send it to client

Keep in mind, the platform also adds a growing number of new features - see features.

target audience

It's best (but not limited) for

  • for hobby projects
  • for experiments
  • for projects with a low number of requests: webhooks, scheduled processing, etc..
  • for a project working on low-end machines: raspberry pi, cheapest VPS, etc..

However, if your projects have overgrown the platform limitations, it should be quite easy to migrate to any other solutions, because most low-level details are hidden and could be replaced in a few days (basically - just wrap script to HTTP service)

Also, it is possible to scale the platform performance by just launching the same instances of the platform with a shared file system (or docker images) with a balancer in front of it.

Contributing

The platform is quite simple Golang project with Vue + Quasar frontend and should be easy for newcomers. Caveats and tips for backend check here

For UI check sub-repo

Any PR (docs, code, styles, features, ...) will be very helpful!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].