项目作者: sirikon

项目描述 :
Minimalistic deployment tool
高级语言: Go
项目地址: git://github.com/sirikon/molly.git
创建时间: 2016-08-10T21:48:24Z
项目社区:https://github.com/sirikon/molly

开源协议:MIT License

下载


Molly

CircleCI
Go Report Card

Molly Malone

Installation

Automatic

  1. curl https://molly.sirikon.me/install.sh | bash

Manual

  1. wget https://dl.sirikon.me/molly.zip

This will download a zip file with molly binary inside,
put it wherever you want (/usr/bin for example) be sure it’s
a path inside your $PATH environment variable.

Whatever option you choose, once done, you should be able to run molly
command on your terminal.

Usage

Creating a new project

  1. molly project add [project name]

This will create the folder structures inside /srv/molly/[project name].

  1. /srv/molly/[project name]
  2. ├─ run.sh
  3. ├─ deploy.sh
  4. └─ files/

Here you
can find the run.sh and deploy.sh files, which are used to define how
to run and deploy your project.

Configuring a project

When molly receives a new artifact will first deploy and then run
the project (both files are executed with /srv/molly/[project name]/files
as CWD)

For example, for a Node.js project, the deploy.sh file would look like this:

  1. unzip $MOLLY_ARTIFACT
  2. /path/to/npm install

And the run.sh file should look like this:

  1. EXAMPLE_ENV_VAR=example_value
  2. /path/to/node index.js

Running molly daemon

To run the molly daemon just run the following command:

  1. molly daemon

This will start a web server on port 8080 ready to receive the deployment requests.

Note: Right now molly doesn’t self-install as a service, you need
to do this by yourself to be sure it’s always working.

Deploying a project

Once the project is properly configured and the molly daemon is running, you are able to deploy
your project.

  1. zip -r artifact * # Compress whatever you need to deploy into artifact.zip
  2. curl -F artifact=@./artifact.zip -F project=[project name] -F token=[project token] "http://yourserver.com:8080/deploy"

License

  1. MIT License
  2. Copyright (c) 2016 Carlos Fernández
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in all
  10. copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. SOFTWARE.