joyent-portal/packages/docker-compose-client
Sérgio Ramos 1cc2330b22 feat(joyent-cp-frontend): create dg initial implementation 2017-06-15 17:11:40 +01:00
..
lib feat(portal-data): can stop services 2017-06-09 00:04:46 +01:00
test feat(portal-data): can stop services 2017-06-09 00:04:46 +01:00
.eslintignore chore: initial lerna setup 2017-05-25 10:56:50 +01:00
.eslintrc chore: initial lerna setup 2017-05-25 10:56:50 +01:00
.tern-project chore: initial lerna setup 2017-05-25 10:56:50 +01:00
README.md feat: support scale and cb in docker 2017-06-03 00:20:49 +01:00
package.json feat(joyent-cp-frontend): create dg initial implementation 2017-06-15 17:11:40 +01:00
yarn.lock feat: support scale and cb in docker 2017-06-03 00:20:49 +01:00

README.md

docker-compose-client

License: MPL 2.0 npm standard-readme compliant

Server that exposes CloudApi through GraphQL.

Table of Contents

Install

yarn add docker-compose-client

Server

build

λ git clone git@github.com:yldio/docker-compose-api.git
λ cd docker-compose-api
λ docker build -t docker-compose-api .

run

local:

λ docker run -p 4242:4242 -d docker-compose-api

remote:

λ docker run \
-v "/local/path/to/docker/cert":"/usr/src/cert" \
-e DOCKER_CERT_PATH=/usr/src/cert \
-e DOCKER_HOST="http://us-sw-1.docker.joyent.com:2376" \
-e DOCKER_CLIENT_TIMEOUT=300 \
-e COMPOSE_HTTP_TIMEOUT=300 \
-p 4242:4242 \
-d \
docker-compose-api

Usage

const client = new DockerComposeClient();

client.provision({
  projectName: 'docker-compose-client',
  manifest: `
    hello:
      image: hello-world:latest
    world:
      image: consul:latest
    node:
      image: node:latest
  `
}, (err, res, more) => {
  // can be called multiple times, check 'more' if that is the case
});

License

MPL-2.0