# marathon-deploy

> Deploy a docker image to Marathon

Latest version **1.4.1** (published 2016-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install marathon-deploy
pnpm add marathon-deploy
yarn add marathon-deploy
bun add marathon-deploy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2016-06-10 |
| First published | 2016-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Bjarne Oeverli |
| Maintainers | bjarneo |
| Keywords | marathon, deploy, docker |

## Links

- npm: https://www.npmjs.com/package/marathon-deploy
- Repository: https://github.com/bjarneo/marathon-deploy
- Issues: https://github.com/bjarneo/marathon-deploy/issues
- npm.io page: https://npm.io/package/marathon-deploy

## Dependencies (3)

- [extend](https://npm.io/package/extend.md) ^3.0.0
- [thin-request](https://npm.io/package/thin-request.md) ^1.0.1
- [mini-template-engine](https://npm.io/package/mini-template-engine.md) ^1.3.5

## Recent versions

- 1.4.1 (latest) — 2016-06-10
- 1.4.0 — 2016-06-10
- 1.3.0 — 2016-05-15
- 1.2.1 — 2016-05-11
- 1.2.0 — 2016-05-01
- 1.1.0 — 2016-04-12
- 1.0.1 — 2016-04-11
- 1.0.0 — 2016-04-10

## README

Marathon deploy
======
![Travis](https://travis-ci.org/bjarneo/marathon-deploy.svg?branch=master)

Deploy a docker image to Marathon.

Installation
------
```bash
$ npm i --save marathon-deploy
```

Usage
------
```js
const deploy = require('marathon-deploy');

deploy('docker-image-tag')
    .then(res => {
      console.log('Success!');
      console.log('Id: %s', res.deploymentId);
      console.log('Version: %s', res.version);
    }).catch(err => {
        throw new Error(err);
    });
```

Options
```js
const deploy = require('marathon-deploy');

const opts = {
    marathonFile: 'location/to/marathon.json' // default 'marathon.json'
};

deploy('docker-image-tag', opts)
  .then()
  .catch()
```

You can also pass marathon config as an object vs using an own file
```js
const deploy = require('marathon-deploy');

const opts = {
    marathonConfig: {
        endpoint: 'your-endpoint.com',
        etc: 'some more data',
        even: 'more data'
    }
};

deploy('docker-image-tag', opts)
  .then()
  .catch()
```

Tests
------
```bash
$ npm test
```

Inspiration
------
[grunt-marathon](https://github.com/olesku/grunt-marathon/)

Contribution
------
Contributions are appreciated.

License
------
MIT-licensed. See LICENSE.

---
_Source: https://npm.io/package/marathon-deploy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
