All Projects → hauleth → plug_systemd_example

hauleth / plug_systemd_example

Licence: other
Example Elixir application that integrates with systemd features

Programming Languages

elixir
2628 projects
Makefile
30231 projects
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to plug systemd example

uefi-app-x64
Example Rust project for building UEFI applications
Stars: ✭ 20 (+33.33%)
Mutual labels:  example-project
nuxt-ecommerce
🛍 Ecommerce Store with Nuxt
Stars: ✭ 82 (+446.67%)
Mutual labels:  example-project
adsorber
Ad-blocker for Linux systems purely built on POSIX-compliant shell scripts.
Stars: ✭ 57 (+280%)
Mutual labels:  systemd
triton
Triton Operating System
Stars: ✭ 56 (+273.33%)
Mutual labels:  systemd
PocketSphinxUnityDemo
A sample Unity project showing how to use PocketSphinx.
Stars: ✭ 32 (+113.33%)
Mutual labels:  example-project
fuzzy-sys
Utility tool for using systemctl interactively
Stars: ✭ 106 (+606.67%)
Mutual labels:  systemd
symfony-angular-todomvc
An implementation of TodoMVC using AngularJS and Symfony REST Edition
Stars: ✭ 94 (+526.67%)
Mutual labels:  example-project
angular-pwa
Angular 13 Example Progressive Web App (PWA)
Stars: ✭ 45 (+200%)
Mutual labels:  example-project
supervisor-rs
Lite Rust version of supervisor, inspired by python version
Stars: ✭ 34 (+126.67%)
Mutual labels:  systemd
kernel-syslog
📝 Kernel module that can be used as a replacement for syslog, logger or logwrapper
Stars: ✭ 37 (+146.67%)
Mutual labels:  systemd
SplashScreenExample
How to implement a Splash Screen in ReactNative
Stars: ✭ 14 (-6.67%)
Mutual labels:  example-project
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (+6.67%)
Mutual labels:  example-project
zramd
Automatically setup swap on zram ✨ with optional systemd support, a simpler alternative to zram-generator and systemd-swap
Stars: ✭ 45 (+200%)
Mutual labels:  systemd
play-scala-streaming-example
Example Play application showing Comet and Server Sent Events in Scala
Stars: ✭ 42 (+180%)
Mutual labels:  example-project
my-systemd-service-file-generator
A simple Systemd service file online generator.
Stars: ✭ 49 (+226.67%)
Mutual labels:  systemd
nuxt-realworld
🛠 Built a Example App of RealWorld with Nuxt & Composition API ⚗️
Stars: ✭ 127 (+746.67%)
Mutual labels:  example-project
java-basic-skeleton
☕🚀 Java Bootstrap: Skeleton for your new projects
Stars: ✭ 37 (+146.67%)
Mutual labels:  example-project
play-scala-chatroom-example
Play chatroom with Scala API
Stars: ✭ 43 (+186.67%)
Mutual labels:  example-project
nosystemd.org
Website for arguments against systemd and further resources
Stars: ✭ 49 (+226.67%)
Mutual labels:  systemd
bat
Battery management utility for Linux laptops.
Stars: ✭ 107 (+613.33%)
Mutual labels:  systemd

This project was merged into systemd library examples.


Plug systemd Example

This is example of Plug+Cowboy application that integrates with systemd via systemd library features like:

  • Socket activation to listen on privileged port port (80) while VM running as unprivileged user www-data
  • Journal logging, which allows for structured logging and multiline logs
  • Watchdog integration which allows for triggering restarts from within application
  • Status notifications where application reports readiness when it is really ready and will inform when the application is in process of shutting down

ASCIICinema recording of shutdown handling:

asciicast

Installation

This project require Elixir 1.10+ for logger integration and OTP 23+ for proper socket support

  1. Clone repo.
  2. Run make (you will need to enter sudo password for installation of systemd units).
  3. Application will be available at http://localhost/.

Endpoints

  • / - return OS PID of VM
  • /slow - wait 5s before sending response
  • /hello - respond with string world
  • /stop - trigger Watchdog
  • /reload - simulate application reload that last 10s
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].