Git Product home page Git Product logo

deployer's Introduction

 _____         _   _   _ _ _     _   
|   | |___ ___| |_| |_| | | |___| |_
| | | | . |  _|  _|   | | | | -_| . |
|_|___|___|_| |_| |_|_|_____|___|___|

Deployer v0.6

Codacy Badge

What is the deployer:

The Deployer is a continuous deployment(CD) pipeline tool for automate deployment in an ubuntu environment

Supported Deployment types: Laravel, Vue

Easy setup, Easy configuration, Zero downtime

In short, what it is doing?

checks & cleanup > git clone > change git branch > build prod > copy to destination > create symlink

Features:

  • Automatic Directory Checks and Creations
  • Automatic Cleanup
  • Git clone repo
  • Git select branch
  • Symlink generation
  • Custom After Build Commands
  • Self Update
  • Rollback
  • Config generator

Builders:

  • Laravel Build process
  • Vue Build process

Feature Flags:

  • Is_production

Requirements:

  • Ubuntu 18.04 or later
  • builder requirements:
    • composer
    • NPM
    • bash
    • compatible user on the target system

Installation:

Before you start the installation, we are highly recommend to create a user on your target system without sudo permissions, but with write access to the destination folder.

After you created and logged in to the user, please follow this steps:

  1. Get the deployer app

    Clone the project into your user's folder on the target system.

       git clone https://github.com/gaboreszaki/deployer.git
  2. Create Config files

    Create a file called YOUR_DOMAIN_NAME.config.sh in the /config directory.

    examples: cv.northweb.dev.config.sh, example.com.config.sh, dev.example.com.config.sh

    Template for config files:

    #!/usr/bin/env bash
    
    DEPLOYMENT_NAME="xy.example.com" 
    DEPLOYMENT_TYPE="vue" #[vue, laravel]
    
    GIT_url="YOUR_GITHUB_URL" # https link for github public project
    GIT_branch="TARGET_BRANCH" # main, dev... depends on your repository
    GIT_target_folder="/var/www/YOUR_PROJECT_FOLDER" # destination for the built files (RW required)
    GIT_temp_folder="$APP_user_home_dir/deployment_temp" # temp location for create build (RW required)
    
    
    ACTIVE_folder="$GIT_target_folder/active" # symlink folder for host like Apache or Nginx 
    ACTIVE_version="$GIT_target_folder/$APP_build_date" #naming convention for the folders
    ACTIVE_env="$GIT_target_folder/env/.env" #laravel .env file location, for symlink
    
    #OPTIONAL
    RUNNER_AFTER=('php artisan xy', 'php XY_COMMAND') #Array with all items runnable after build 
    
  3. Change file mode Change the file mod on the deploy.sh to be executable

    chmod +x deploy.sh

Usage:

After setup, just run the deploy command with the deployment name, Alternatively you can add config files to the config folder to extend the tool with new deployments.

deploy.sh [deployment_name]

./deploy.sh xy.example.com

deployer's People

Contributors

gaboreszaki avatar

Stargazers

 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.