Git Product home page Git Product logo

deploy-script's Introduction

Instructions

Example config file

module = example
path = /usr/local/www

owner = deploy
group = apache

includes = tmp/cache/index.htmlmod
excludes = sql /tests tmp/cache/*

ssh_user = deploy

[staging]
hosts = bulldog dalmatian

[live]
hosts = poodle labrador

Explanation

The config file should be stored in /configs. The reason I used a subdirectory is to prevent the shell from autocompleting the name of the config file ... as I would prefer people would be explicit about which module they are deploying.

  • module - the name of the module.
  • path - the path on the server where the module resides.
  • owner (optional) - chown the module to owner before deploying
  • group (optional) - chgrp the module to group before deploying
  • includes (optional) - rsync --include
  • excludes (optional) - rsync --exclude
  • ssh_user - the user used to connect to the host

[environment] sections

  • hosts - a space delimited list of hosts

Usage

deploy (-t TAG | -b BRANCH) -n example

  • (--tag|-t) TAG - Checkout tag TAG
  • (--branch|-b) BRANCH - Checkout branch BRANCH
  • (--environment|-e) ENVIRONMENT - Use environment ENVIRONMENT (e.g. live, staging)
  • (--dry-run|-d|-n) - Dry-run

TODO

  • Add a repo to the config file so if the module has not been cloned, the script can do it
  • Add a way to have per-environment path
  • Add a way to have per-host users
  • Whether to --delete should be an option
  • Should be able to pass alternative options to rsync
  • have a defaults ini file

deploy-script's People

Contributors

dangerous avatar

Stargazers

Weldhapi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.