_____ _ _ _ _ _ _
| | |___ ___| |_| |_| | | |___| |_
| | | | . | _| _| | | | | -_| . |
|_|___|___|_| |_| |_|_|_____|___|___|
Deployer v0.6
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
- 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
- Ubuntu 18.04 or later
- builder requirements:
- composer
- NPM
- bash
- compatible user on the target system
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:
-
Get the deployer app
Clone the project into your user's folder on the target system.
git clone https://github.com/gaboreszaki/deployer.git
-
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
-
Change file mode Change the file mod on the
deploy.sh
to be executablechmod +x deploy.sh
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