All Projects → komuw → Meli

komuw / Meli

Licence: mit
faster, drop in, alternative to docker-compose

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Meli

Docker Continuous Deployment
continuous deployment of a microservices application with Docker
Stars: ✭ 141 (-11.32%)
Mutual labels:  docker-compose
Docker Wordpress
WordPress container with Nginx 1.16 & PHP-FPM 7.3 based on Alpine Linux
Stars: ✭ 148 (-6.92%)
Mutual labels:  docker-compose
Fastapi Celery
Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.
Stars: ✭ 154 (-3.14%)
Mutual labels:  docker-compose
Node Docker Good Defaults
sample node app for Docker examples
Stars: ✭ 1,944 (+1122.64%)
Mutual labels:  docker-compose
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-7.55%)
Mutual labels:  docker-compose
Container
HedgeDoc container image resources
Stars: ✭ 149 (-6.29%)
Mutual labels:  docker-compose
Go Oauth2 Server
A standalone, specification-compliant, OAuth2 server written in Golang.
Stars: ✭ 1,843 (+1059.12%)
Mutual labels:  docker-compose
Docker Phoenix
A dockerized Phoenix development and runtime environment.
Stars: ✭ 152 (-4.4%)
Mutual labels:  docker-compose
Media Docker
all-in-one deployment and configuration for an all-in-one media server, running on docker.
Stars: ✭ 148 (-6.92%)
Mutual labels:  docker-compose
Docker Traefik
Script to setup Traefik reverse-proxy in Docker with Compose
Stars: ✭ 153 (-3.77%)
Mutual labels:  docker-compose
Practical Dapr
A full-stack .NET microservices build on Dapr and Tye
Stars: ✭ 140 (-11.95%)
Mutual labels:  docker-compose
Bmw Labeltool Lite
This repository provides you with a easy to use labeling tool for State-of-the-art Deep Learning training purposes.
Stars: ✭ 145 (-8.81%)
Mutual labels:  docker-compose
Infrastructure As Code Tutorial
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Stars: ✭ 1,954 (+1128.93%)
Mutual labels:  docker-compose
Django React Typescript
A boilerplate with Django on the backend, React on the frontend, and much more!
Stars: ✭ 142 (-10.69%)
Mutual labels:  docker-compose
Skywalking Docker
【Deprecated】🎉 Deploy Skywalking in Docker container.
Stars: ✭ 154 (-3.14%)
Mutual labels:  docker-compose
Docker Portainer Letsencrypt
Portainer docker container over SSL Certificate using Let's Encrypt automated by our webproxy docker-compose-letsencrypt-nginx-proxy
Stars: ✭ 141 (-11.32%)
Mutual labels:  docker-compose
Django Celery Docker Example
Example Docker setup for a Django app behind an Nginx proxy with Celery workers
Stars: ✭ 149 (-6.29%)
Mutual labels:  docker-compose
Larakube
Laravel app deployment for auto scaled Kubernetes cluster
Stars: ✭ 157 (-1.26%)
Mutual labels:  docker-compose
Usenet Docker
Docker-compose configuration for Sabnzbd, CouchPotato, Plex, Sonarr, Plexpy, Nzbhydra, Muximux, Radarr, NZBGet and Ombi with a Nginx proxy.
Stars: ✭ 153 (-3.77%)
Mutual labels:  docker-compose
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-3.77%)
Mutual labels:  docker-compose

meli

ci codecov GoDoc Go Report Card

Meli is supposed to be a faster, and drop in, alternative to docker-compose. Faster in the sense that, Meli will try to pull as many services(docker containers) as it can in parallel.

Meli is a Swahili word meaning ship; so think of Meli as a ship carrying your docker containers safely across the treacherous container seas.

It's currently work in progress, API will remain unstable for sometime.

I only intend to support docker-compose version 3+

Meli is NOT intended to replicate every feature of docker-compose, it is primarily intended to enable you to pull, build and run the services in your docker-compose file as fast as possible.
If you want to exec in to a running container, use docker; if you want to run an adhoc command in a container, use docker; if you want..... you get the drift.

Installing/Upgrading

Download a binary release for your particular OS from the releases page
We have binaries for:

  • linux(64bit)
  • windows(64bit)
  • macOS(64bit)

Usage

meli --help

Usage of meli:
  -up
    	Builds, re/creates, starts, and attaches to containers for a service.
        -d option runs containers in the background
  -f string
    	path to docker-compose.yml file. (default "docker-compose.yml")
  -build
    	Rebuild services
  -v	Show version information.
  -version
    	Show version information.

cat docker-compose.yml

version: '3'
services:
  redis:
    image: 'redis:3.0-alpine'
    environment:
      - RACK_ENV=development
      - type=database
    ports:
      - "6300:6379"
      - "6400:22"

meli -up

redis :: Pulling from library/redis 
redis :: Pulling fs layer 
redis :: Pulling fs layer 
redis :: Downloading [======================>        ]  3.595kB/8.164kB
redis :: Downloading [==============================>]  8.164kB/8.164kB
redis :: Download complete [========================>]  8.164kB/8.164kB
redis :: The server is now ready to accept connections on port 6379

Usage as a library

You really should be using the official docker Go sdk
However, if you feel inclined to use meli;

package main

import (
	"context"
	"log"
	"os"

	"github.com/docker/docker/client"
	"github.com/komuw/meli"
)

func main() {
	dc := &meli.DockerContainer{
		ComposeService: meli.ComposeService{Image: "busybox"},
		LogMedium:      os.Stdout,
		FollowLogs:     true}

	ctx := context.Background()
	cli, err := client.NewEnvClient()
	if err != nil {
		log.Fatal(err, " :unable to intialize docker client")
	}
	defer cli.Close()

	meli.LoadAuth() // load dockerhub info
	err = meli.PullDockerImage(ctx, cli, dc)
	log.Println(err)

}

Benchmarks

Aaah, everyones' favorite vanity metric yet no one seems to know how to conduct one in a consistent and scientific manner.
Take any results you see here with a large spoon of salt; They are unscientific and reek of all that is wrong with most developer benchmarks.

Having made that disclaimer,

Benchmark test:
this docker-compose file

Benchmark script:
for docker-compose:
docker ps -aq | xargs docker rm -f; docker system prune -af; /usr/bin/time -apv docker-compose up -d
for meli:
docker ps -aq | xargs docker rm -f; docker system prune -af; /usr/bin/time -apv meli -up -d

Benchmark results(average):

tool Elapsed wall clock time(seconds)
docker-compose 10.411 seconds
meli 3.945 seconds

Thus, meli appears to be 2.6 times faster than docker-compose(by wall clock time).
You can checkout the current benchmark results from circleCI
However, I'm not making a tool to take docker-compose to the races.

Development

Build

git clone [email protected]:komuw/meli.git
go build -trimpath -o meli cli/cli.go
./meli -up -f /path/to/docker-compose-file.yml

1

go build -trimpath -o meli cli/cli.go
dlv exec ./meli -- -up -f testdata/docker-compose.yml
(dlv) help
(dlv) break cli/cli.go:246
(dlv) continue

2

dlv debug cli/cli.go -- -up -f testdata/docker-compose.yml
(dlv) help

3

you can also insert runtime.Breakpoint() at any point in code and then use delve(it will break at the point u did the insert)

func main(){
	x:=90
	runtime.Breakpoint()
	fmt.Println(x)
}

dlv debug main.go -- -someArg someArgValue

TODO

  • add better documentation(godoc)
  • stabilise API(maybe)
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].