PHPackages                             jhoncytech/automatic-deployment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. jhoncytech/automatic-deployment

ActiveProject[DevOps &amp; Deployment](/categories/devops)

jhoncytech/automatic-deployment
===============================

Automated deployment script through Vagrant

v1.0.2(5y ago)3221MITShell

Since Jan 17Pushed 5y ago2 watchersCompare

[ Source](https://github.com/jhonnygo/automated-deployment)[ Packagist](https://packagist.org/packages/jhoncytech/automatic-deployment)[ RSS](/packages/jhoncytech-automatic-deployment/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

automated-deployment
====================

[](#automated-deployment)

Automated deployment script through Vagrant

 [![Screenshot de la plantilla](img/top-header.jpg)](img/top-header.jpg)

Requirements
------------

[](#requirements)

- Must have installed Vagrant in your PC.

    You can download vagrant by clicking in the follow address

    In vagrant make sure you have the vagrant-disksize plugin installed, if not, install it with the follow command in your local PC.

    ```
    #> vagrant plugin install vagrant-disksize
    ```
- Must have installed Virtualbox in your PC.

    You can download virtualbox by clicking in the follow address
- In remote server you need to point the document root of vhosts to /var/www/current like the follow image:

    > That's because this script creates the necessary folders during deployment
    > and the main one is current

     [![Vhost](img/img-config-001.jpg)](img/img-config-001.jpg)> The script generates a structure like this where current is pointing
    > to the desire deployment

     [![Deploy Version](img/img-config-002.jpg)](img/img-config-002.jpg)> The script generates the deploy version in file **deploy-version** stored
    > into /var/www/sql/

     [![Deploy Version](img/img-config-005.jpg)](img/img-config-005.jpg)> All releases are stored in folder **releases** where you can see the folder
    > that contain the html files with the deploy-version.

     [![Releases](img/img-config-003.jpg)](img/img-config-003.jpg)> In the same way all .sql files are stored in sql folder where you can see the
    > database version with the deploy version too.

     [![SQL Files](img/img-config-004.jpg)](img/img-config-004.jpg)> Finally, you can see the **scripts-data-access.sh** file that stores all necessary
    > data for the script work properly. This file is encrypted for security reasons.

     [![Script Data Access](img/img-config-006.jpg)](img/img-config-006.jpg)
- **Optionally** you can to install composer if you want to use composer for to get the project.

    You can download and install composer following the instruction in the official web page

Description
-----------

[](#description)

This script developed with shell allows you to create a machine on a local PC by using vagrant at the same time that it deploy the local environment to remote production environment, in the same way, the script is capable of doing both "deployments and rollbacks" to the same time that makes commits to GitHub account.

Features
--------

[](#features)

With this script you can:

- Create a locale environment by using vangrant.
- Deploy your local project to remote server with simple command **\[deploy\]** in your local server
- Rollback to previous versions of lasts deployments with a simple command **\[undeploy\]** in remote server
- You can decide how many deployments you want to keep on the remote server.
- You can decide which version you want to rollback from a list of deployments on the remote server by using a simple **\[undeploy\]** command on the remote server.

Tools, software and packages used
---------------------------------

[](#tools-software-and-packages-used)

- Denian 9
- Vagrant 2.2.14
- Virtualbox 6.1
- Shell Script
- PHP
- Composer
- Apache
- MariaDB

How to use it
=============

[](#how-to-use-it)

Step-by-step installation.
--------------------------

[](#step-by-step-installation)

1. Create an empty private repository on GitHub where project deployments will be stored and controlled.

    - This step will only be done the first time, since it is not necessary afterwards.
    - It is very important that you know that every time you create a new project, the repository must also be new.

---

2. Get the project.

    ##### USE THE OPTION YOU WANT TO GET THE PROJECT

    [](#use-the-option-you-want-to-get-the-project)

    ---

    ###### OPTION 1 - GET FROM COMPOSER

    [](#option-1---get-from-composer)

    > Go to where you want to create the project.

    ```
    #> cd C:\Users\User\Documents
    ```

    > Create project using composer.

    ```
    #> composer create-project jhoncytech/automatic-deployment my-web
    ```

    > Go to new created directory.

    ```
    #> cd my-web
    ```

    ---

    ###### OPTION 2 - GET FROM GITHUB REPOSITORY

    [](#option-2---get-from-github-repository)

    > Go to where you want to create the project.

    ```
    #> cd C:\Users\User\Documents
    ```

    > Create a directory on your pc where the entire project will be managed.

    ```
    #> mkdir my-web
    ```

    > Go to new created directory.

    ```
    #> cd my-web
    ```

    > Clone from GitHub the Automated Vagrant Deployment project by JhonnyGO.

    ```
    #> git clone git@github.com:jhonnygo/automated-deployment.git .
    ```

---

3. Edit the project **\[Vagrantfile\]** file.

    This file is located in the folder `C:\Users\User\Documents\my-web\Vagrantfile`

    It's very important that you edit the following mandatory parameters:

    - `config.vm.hostname = "my-web"` =&gt; Name of the host you want for your local server
    - `config.vm.network = "192.168.10.10` =&gt; Private IP you want for your local server
    - `vb.name = "local-my-web"` =&gt; Machine name for Virtualbox

    There are more optional values, feel free to modify them according to your needs.

---

4. Edit the **\[00-shell-script-config.sh\]** file

    This file is located in the folder `C:\Users\User\Documents\my-web\config\scripts\00-shell-script-config.sh`

    It's very important that you edit the following mandatory parameters:

    - `REMOTE_IP=""` It must be a public IP, since it is the IP of the remote server.
    - `LOCAL_IP="192.168.10.10"` It must be a private IP which is the IP of the local server used in Vagrantfile file.
    - `GIT_USER_NAME="Jeff Smith"` GitHub user who will perform the commits.
    - `GIT_USER_EMAIL="jeff.smith@gmail.com"` Email of the GitHub user who will perform the commits.
    - `REPO_GITHUB_HTML=""` URL in SSH format of the GitHub repository where the deployments will be made.

    NOTE: Remember that if you not indicated some password that password will be generated automatically.

---

5. Create the SSH key pair to work with the project repository.

    > Go to following folder of the SSH project Keys: **\[ssh-keys\]**

    ```
    #> cd C:\Users\User\Documents\wy-web\config\ssh-keys
    #> ssh-keygen -t rsa -b 4096 -C "my-web-local"

    ```

    - Use as name: `ssh-key-local-test`
    - Keep password empty:

    The above command will create your SSH key pair.

    IMPORTANT: If you already have your own key pair, you can copy and paste them into this directory.

---

6. Add the public key of your local server **\[ssh-key-local-test.pub\]** on the remote server so that the local server can communicate with the remote one.

    > In local server

    ```
    #> cd C:\Users\User\Documents\wy-web\config\ssh-keys
    #> cat ssh-key-local-test.pub

    ```

    > In remote server

    ```
    #> nano ~/.ssh/authorized_keys

    ```

    copy your local server's public key **\[ssh-key-local-test.pub\]** at the end of the file.
7. Add the public key of your local server **\[ssh-key-local-test.pub\]** to the GitHub account that I created earlier.

---

8. Now, Its time to starts the project.

    > In remote server

    ```
    #> cd C:\Users\User\Documents\wy-web
    #> vagrant up

    ```

---

Available project's commands
============================

[](#available-projects-commands)

Local Server
------------

[](#local-server)

- Stop the project: `#> vagrant halt`
- Start the project: `#> vagrant up`
- Destroy the project: `#> vagrant destroy`
- Deploy the project: `#> deploy`

Remote Server
-------------

[](#remote-server)

- Undeploy the project: `#> undeploy`

 [![Screenshot de la plantilla](img/happy-coding.jpg)](img/happy-coding.jpg)

### Contactos

[](#contactos)

```
- Mail: jhonny@jhoncytech.com
- Web: https://jhoncytech.com
---
- Mail: contacto@jhonnygo.com
- Web: https://jhonnygo.com

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Total

3

Last Release

1906d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a3a67bd2ccc768325d568abf5bab982053b8d3c261197a4179efe9609ededd8?d=identicon)[jhoncytech](/maintainers/jhoncytech)

### Embed Badge

![Health badge](/badges/jhoncytech-automatic-deployment/health.svg)

```
[![Health](https://phpackages.com/badges/jhoncytech-automatic-deployment/health.svg)](https://phpackages.com/packages/jhoncytech-automatic-deployment)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
