Composer is a simple process manager for dev environments.

Composer

Composer is a simple service manager for dev environments.

How to build/install it?

To build composer under ./bin, run:

make build

To build and install composer in the system (under /usr/local/bin), run:

sudo make install

How to configure?

With a compose.yml file:

# version of the config file syntax
version: 1

# define global environment variables accessible by all services
# Following variables are always present:
# $HOME - points to user's home directory
# $PATH - contains colon-delimited paths where executables can be found
# $PWD - project's working directory (where the compose.yml is located)
environment:
  - KEY1: value1
  - KEY2: ${OSVAL} # ${OSVAL} allows referencing composer's own environment

services:
  service1:
    # define environment variables to be used by the service 
    environment:
      - KEY1: value1
      - KEY2: ${OSVAL} # ${OSVAL} allows referencing composer's own environment

    # depends_on defines service dependencies.
    # All dependencies will be started and ready before this service's command is executed.
    depends_on:
      - service2

    # command to be executed to run the service (it's possible to use defined environmental variables)
    command: go run main.go ${KEY1}

  service2:
    # ready_on defines a text which is expected on stdout/stderr when the service is ready.
    # When ready_on is not provided, service is considered ready immediately after executing its command.
    ready_on: "I'm ready"

    # workdir defines a working directory (absolute or relative to current working directory)
    # where the command will be executed.
    workdir: src/
    command: echo I'm ready

How to run it?

With a composer binary:

composer SERVICE

It's possible to define multiple config files with different names, so to use a non-default (composer.yml) file, one must define an environmental variable COMPOSER_FILE, i.e.:

COMPOSER_FILE=custom-composer.yml composer SERVICE

Owner
Thought Foundry, Inc.
Thought Foundry, Inc.
Similar Resources

⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP

⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP

Your new microservice development environment friend. This CLI tool allows you to define a configuration to work with both local applications (Go, Nod

Jan 4, 2023

A very simple utility that allows you to run the desired command or script as soon as a certain process with a known PID completes correctly or with an error.

go-monkill A very simple utility that allows you to run the desired command or script as soon as a certain process with a known PID completes correctl

Dec 17, 2022

👻 A simple API to inter-process communicating between Go and Node

go-to-node A simple API to inter-process communicating between Go and NodeJS. Quick start Go to Node main.go: package main import ( "fmt" "os" "os

Jan 7, 2022

Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly Bubbly - Release Readiness in a Bubble Bubbly emerged from a need that many lean software teams practicing Continuous Integration and Delivery

Nov 29, 2022

This process installs onto kubernetes cluster(s) and provisions workloads designated by the uffizzi interface

Uffizzi Cloud Resource Controller This application connects to a Kubernetes (k8s) Cluster to provision Uffizzi users' workloads on their behalf. While

Dec 14, 2022

Small helper to bridge between Vault and AWS Credential Process.

vault-aws-credential-helper The Vault AWS Credential Helper is a component that can be injected into a task environment and be used as a credential he

Nov 21, 2021

Generic inquiry tool to OPA server for CI process, such as GitHub Actions

opaq opaq is a generic inquiry tool to OPA server. A major purpose of this tool is for inquiry in GitHub Actions. Features Data formatting: OPA server

Jan 20, 2022

Nrod-go - Sample application to process Train Movements messages from the Network Rail Open Data feed

NROD Train Movements Processor Sample application to process Train Movements mes

Dec 3, 2022
Comments
  • Fix commands parsing

    Fix commands parsing

    Certain programs cannot handle empty arguments, so with the following service definition:

    services:
      test:
        environment:
          OPTS: $OPTS
        command: program arg1 $OPTS
    

    when we run composer test, program fails with an error like: ERROR: unrecognized arguments

    This PR replace command parsing with simply running the command inside bash, which takes over variables substitution and parsing.

  • Wait for all services

    Wait for all services

    Currently composer exists when any of the services exists.

    This change allows composer to wait for all specified services to finish before composer process exits.

    E.g.: running composer -wait service1 service2 will cause composer to wait until both services are completed or any of their dependencies exit prematurely.

  • Handle SIGHUP gracefully

    Handle SIGHUP gracefully

    When controlling terminal closes, it sends a SIGHUP to the running process.

    Because composer doesn't handle that signal, it leaves sub-processes running whenever a terminal is closed.

    This MR fixes that.

Rustpm - Process manager and automated updates for RustDedicated
Rustpm - Process manager and automated updates for RustDedicated

rustpm (WIP) Process manager for RustDedicated A drop in replacement for RustDed

Feb 15, 2022
Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments.
Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments.

Reward Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments. It makes possible to run multiple local envir

Dec 9, 2022
Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.

Open Service Mesh (OSM) Open Service Mesh (OSM) is a lightweight, extensible, Cloud Native service mesh that allows users to uniformly manage, secure,

Jan 2, 2023
Vagrant is a tool for building and distributing development environments.

Vagrant Website: https://www.vagrantup.com/ Source: https://github.com/hashicorp/vagrant HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24

Jan 7, 2023
A tool for managing complex enterprise Kubernetes environments as code.

kubecfg A tool for managing Kubernetes resources as code. kubecfg allows you to express the patterns across your infrastructure and reuse these powerf

Dec 14, 2022
Tool (in Go!) to compare and diff container and host environments. Dinosaur fun!

Compenv compare environments between containers, and host ??️ This is a simple tool to compare environments. This means the environment on your host v

Sep 24, 2022
A gh-cli extension for managing environments.

gh-environments A gh-cli extension for managing environments. Installation and Upgrades gh extension install chelnak/gh-environments gh extension upgr

Nov 2, 2022
Ensi-local-ctl - ELC - orchestrator of development environments

ELC - orchestrator of development environments With ELC you can: start a couple

Oct 13, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

Oct 16, 2021
A multi-service dev environment for teams on Kubernetes
A multi-service dev environment for teams on Kubernetes

Tilt Kubernetes for Prod, Tilt for Dev Modern apps are made of too many services. They're everywhere and in constant communication. Tilt powers multi-

Jan 5, 2023