Skip to content

A client designed to work with the swarmer application inside docker

License

Notifications You must be signed in to change notification settings

stevepentland/swarmer-client-js

Repository files navigation

Swarmer JS Client

Build Status npm version semantic-release Greenkeeper badge

This is meant to be a companion application to work with swarmer. It is designed to act as the main ENTRYPOINT in a Dockerfile and handles running the target process and submitting back the results.

Using the Application

In your Dockerfile, install this as a global application via

RUN npm i -g swarmer-client

You will then need to define the command the swarmer-client should run when it is started and where this command should be run from. These are set as environment variables in the Dockerfile like so:

ENV RUN_CMD=node
ENV RUN_BASE_DIR=/app

Assuming you are going to be running a node application from the /app directory in your image.

Once that is complete, you can set the ENTRYPOINT to run the swarmer-client like so:

ENTRYPOINT [ "swarmer-client" ]

Which will then automatically spin up this client when the container starts and run your app.

Once your image is completely built, you can host it somewhere that your swarm nodes can access, and pass it as a new job base to swarmer. Please follow the documentation in that project to see the other environment variables that are set.

Changes

Please see the Changelog

About

A client designed to work with the swarmer application inside docker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •