Git Product home page Git Product logo

deploy.sh's Introduction

deploy.sh

Shell utility to deploy a git repository to a remote SSH server.

Requirements

deploy.sh focuses on having minimal dependencies:

  • SSH access to the remote server
  • bash installed on client
  • git installed on server

Getting started

The script can be copied in the working directory and called with ./deploy.sh or in a directory in the PATH and called with deploy.sh.

Example with command line options

To deploy the repository [email protected]:me/deploy.sh.git to the directory /home/me on the server host, you can run the command:

./deploy.sh -r [email protected]:me/deploy.sh.git -d /home/me -h host

Example with configuration file

You can also specify options with a configuration file named .deploy in the working directory. The file will be sourced, so it follows the environment file format:

# .deploy
DEPLOYMENT_DIRECTORY=/home/me
[email protected]:me/deploy.sh.git
SSH_HOST=user@host
FRAMEWORKS="python django=static"
SHARED_PATHS=db.sqlite3

You can then run the script:

deploy.sh

If you need to specify a secret in the configuration (a token to fetch the git repository for instance), you can do so in the .deploy-secret file which follows the same format as .deploy file. This file should not be committed in your git repository.

Advanced usage

Running deploy.sh --help displays a complete documentation of deploy.sh (which is also readable at the beginning of the script).

The following features are detailed:

  • hooks (ability to run custom code before or after steps)
  • rollback
  • supported frameworks (python, django, npm, sqlite)

deploy.sh's People

Contributors

clement-escolano avatar

Watchers

 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.