Skip to content

Commit

Permalink
Merge pull request #94 from ngmy/feature/update_documents
Browse files Browse the repository at this point in the history
Update documents
  • Loading branch information
ngmy committed Mar 24, 2020
2 parents 6e0794a + 55ae525 commit 0bf9f86
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 110 deletions.
111 changes: 40 additions & 71 deletions README.md
Expand Up @@ -3,8 +3,7 @@
[![Latest Stable Version](https://poser.pugx.org/ngmy/webloyer/v/stable)](https://packagist.org/packages/ngmy/webloyer)
[![Total Downloads](https://poser.pugx.org/ngmy/webloyer/downloads)](https://packagist.org/packages/ngmy/webloyer)
[![Latest Unstable Version](https://poser.pugx.org/ngmy/webloyer/v/unstable)](https://packagist.org/packages/ngmy/webloyer)
[![License](https://poser.pugx.org/ngmy/webloyer/license)](https://packagist.org/packages/ngmy/webloyer)

[![License](https://poser.pugx.org/ngmy/webloyer/license)](https://packagist.org/packages/ngmy/webloyer)<br>
[![Build Status](https://travis-ci.org/ngmy/webloyer.svg?branch=master)](https://travis-ci.org/ngmy/webloyer)
[![Coverage Status](https://coveralls.io/repos/ngmy/webloyer/badge.svg?branch=master)](https://coveralls.io/r/ngmy/webloyer?branch=master)

Expand All @@ -15,36 +14,21 @@ Webloyer is a Web UI for managing [Deployer](https://github.com/deployphp/deploy
Webloyer has the following features:

* Project management

* Managing deployment settings on a project-by-project basis

* Managing deployment settings on a project-by-project basis
* Deployment management on a project-by-project basis

* 1-click deploying and rolling back

* Keeping a log of every deployments

* E-mail notifications can be sent when a deployment finishes

* 1-click deploying and rolling back
* Keeping a log of every deployments
* E-mail notifications can be sent when a deployment finishes
* Recipe management

* Creating, editing, deleting and listing recipe files

* Creating, editing, deleting and listing recipe files
* Server management

* Creating, editing, deleting and listing server list files

* Creating, editing, deleting and listing server list files
* User management

* Authentication with e-mail address and password

* Role-based access control to features

* Authentication with e-mail address and password
* Role-based access control to features
* Web APIs

* Webhooks

* GitHub
* GitHub

## Screenshots

Expand All @@ -55,87 +39,72 @@ See [screenshots](/SCREENSHOTS.md).
Webloyer has the following requirements:

* PHP >= 5.6.0

* OpenSSL PHP Extension

* PDO PHP Extension

* Mbstring PHP Extension

* Tokenizer PHP Extension

## Installation

1. Download the application source code by using the Composer `create-project` command:

```
composer create-project ngmy/webloyer
```

2. Give write permission to the `storage` directory and the `bootstrap/cache` directory for your web-server user by running the following command:

```
chmod -R 777 storage
chmod -R 777 bootstrap/cache
```
### Option 1: Download Source Code

1. Download the application source code by using the Composer `create-project` command:
```
composer create-project ngmy/webloyer
```
2. Give write permission to the `storage` directory and the `bootstrap/cache` directory for your web server user (e.g. `www-data`) by running the following command:
```
chown -R www-data:www-data storage
chown -R www-data:www-data bootstrap/cache
```
3. Run the installer by using the Artisan `webloyer:install` command:

```
php artisan webloyer:install
```

```
php artisan webloyer:install
```
**Note:** You must be running this command as your web server user.
4. Start the queue listener as a background process by using the Artisan `queue:listen` command:

```
nohup php artisan queue:listen --timeout=0 &
```

**Note:** You must be running this command as your deployment-user.

```
nohup php artisan queue:listen --timeout=0 &
```
**Note:** You must be running this command as your web server user.
5. Add the following Cron entry to your server:
```
* * * * * php /path/to/webloyer/artisan schedule:run >> /dev/null 2>&1
```
**Note:** You must be running this Cron entry as your web server user.

```
* * * * * php /path/to/webloyer/artisan schedule:run >> /dev/null 2>&1
```
### Option 2: Using Docker

You can also install using [Webloyer Docker](https://github.com/ngmy/webloyer-docker).

## Basic Usage

### Step 1: Login to Webloyer

1. Go to the Login page by click the "Login" link.

2. Enter the e-mail address and password.

3. Click the "Login" button to login to Webloyer.

### Step 2: Create your project
### Step 2: Create Your Project

1. Go to the Create Project page by click the "Create" button in the Projects page.

2. Enter your project information.

**Note:** For now, Webloyer only supports the `deploy` task and the `rollback` task. Therefore, you must define these tasks in your Deployer recipe file.

**Note:** If you want to use the e-mail notification, you need to enter your e-mail settings from the E-Mail Settings page.

**Note:** For now, Webloyer only supports the `deploy` task and the `rollback` task. Therefore, you must define these tasks in your Deployer recipe file.
**Note:** If you want to use the e-mail notification, you need to enter your e-mail settings from the E-Mail Settings page.
3. Click the "Store" button to finish project creation process.

### Step 3: Managing deployments
### Step 3: Managing Deployments

1. Go to the Deployments page by click the "Deployments" button.

2. Run the `deploy` task by click the "Deploy" button. Or run the `rollback` task by click the "Rollback" button.

3. After the task of execution has been completed, it is possible to go to the Deployment Detail page by click the "Show" button, you can see the details of the task execution results.

## Advanced Usage

* [Web APIs](/WEBAPIS.md)

* [Webhooks](/WEBHOOKS.md)

## Foundation library
## Foundation Library

Webloyer uses [Laravel](http://laravel.com/) as a foundation PHP framework.

Expand Down
31 changes: 12 additions & 19 deletions SCREENSHOTS.md
Expand Up @@ -4,38 +4,31 @@

[![https://gyazo.com/97aadef9d25c06e67d70aae12a0aa8da](https://i.gyazo.com/97aadef9d25c06e67d70aae12a0aa8da.png)](https://gyazo.com/97aadef9d25c06e67d70aae12a0aa8da)

## Project management

[![https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713](https://i.gyazo.com/d8c7d46ac818f57e738dd34fa1c83713.png)](https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713)
## Project Management

[![https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713](https://i.gyazo.com/d8c7d46ac818f57e738dd34fa1c83713.png)](https://gyazo.com/d8c7d46ac818f57e738dd34fa1c83713)<br>
[![https://gyazo.com/24d48ddf502b46acdc407efc7f5c2dda](https://i.gyazo.com/24d48ddf502b46acdc407efc7f5c2dda.png)](https://gyazo.com/24d48ddf502b46acdc407efc7f5c2dda)

## Deployment management

[![https://gyazo.com/39e520f537d877bea52070d0a444ccff](https://i.gyazo.com/39e520f537d877bea52070d0a444ccff.png)](https://gyazo.com/39e520f537d877bea52070d0a444ccff)
## Deployment Management

[![https://gyazo.com/39e520f537d877bea52070d0a444ccff](https://i.gyazo.com/39e520f537d877bea52070d0a444ccff.png)](https://gyazo.com/39e520f537d877bea52070d0a444ccff)<br>
[![https://gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3](https://i.gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3.png)](https://gyazo.com/17cc4ff25b25e0a85e6a0e79cbbc7ac3)

## Recipe management

[![https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7](https://i.gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7.png)](https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7)
## Recipe Management

[![https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7](https://i.gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7.png)](https://gyazo.com/d609b1ee6bc6b62b189d7cd100a08bf7)<br>
[![https://gyazo.com/47b875828f5f84156816a015d46472ed](https://i.gyazo.com/47b875828f5f84156816a015d46472ed.png)](https://gyazo.com/47b875828f5f84156816a015d46472ed)

## Server management

[![https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3](https://i.gyazo.com/bb97dea77c1d84edd6b598420c9f7df3.png)](https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3)
## Server Management

[![https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3](https://i.gyazo.com/bb97dea77c1d84edd6b598420c9f7df3.png)](https://gyazo.com/bb97dea77c1d84edd6b598420c9f7df3)<br>
[![https://gyazo.com/529e418174a32df51e12234f0a678c1b](https://i.gyazo.com/529e418174a32df51e12234f0a678c1b.png)](https://gyazo.com/529e418174a32df51e12234f0a678c1b)

## User management

[![https://gyazo.com/8812374fa5917022cfb42fd333282c5f](https://i.gyazo.com/8812374fa5917022cfb42fd333282c5f.png)](https://gyazo.com/8812374fa5917022cfb42fd333282c5f)

[![https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551](https://i.gyazo.com/e89694d7dc7cdf05c4605f384aba1551.png)](https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551)

[![https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff](https://i.gyazo.com/e4f3aab674caa9ab97aa78ff206575ff.png)](https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff)
## User Management

[![https://gyazo.com/8812374fa5917022cfb42fd333282c5f](https://i.gyazo.com/8812374fa5917022cfb42fd333282c5f.png)](https://gyazo.com/8812374fa5917022cfb42fd333282c5f)<br>
[![https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551](https://i.gyazo.com/e89694d7dc7cdf05c4605f384aba1551.png)](https://gyazo.com/e89694d7dc7cdf05c4605f384aba1551)<br>
[![https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff](https://i.gyazo.com/e4f3aab674caa9ab97aa78ff206575ff.png)](https://gyazo.com/e4f3aab674caa9ab97aa78ff206575ff)<br>
[![https://gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4](https://i.gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4.png)](https://gyazo.com/1e12d1c8ed1447dcb3cb7fd0210a47c4)

## Settings
Expand Down
38 changes: 19 additions & 19 deletions WEBAPIS.md
@@ -1,12 +1,12 @@
# Web APIs

Webloyer provide Web APIs.
Webloyer provide Web APIs.<br>
For example, you can use these for Git hooks.

## Protocol

The Web APIs use the [JSON-RPC 2.0](http://www.jsonrpc.org/specification) protocol.
You must call the Web APIs with a **POST** HTTP request.
The Web APIs use the [JSON-RPC 2.0](http://www.jsonrpc.org/specification) protocol.<br>
You must call the Web APIs with a **POST** HTTP request.<br>
And you must call the Web APIs with a `Accept` header set to `application/json-rpc`.

## Endpoint
Expand All @@ -17,28 +17,28 @@ And you must call the Web APIs with a `Accept` header set to `application/json-r

## Authentication

You must provide your API token into a `Authorization: Bearer` header.
You must provide your API token into a `Authorization: Bearer` header.<br>
You can see your API token in Edit API Token Page ([Users] -> [Edit] -> [Edit API Token]).

## Procedures
## API Reference

### deploy

Deploy a project.

#### Arguments
#### Parameters

|Name|Type|Description|
|---|---|---|
|project_id|integer|Project id.|
| Name | Type | Description |
| --- | --- | --- |
| project_id | integer | Project id. |

#### Example request
#### Example Request

```
curl -XPOST -d'{"jsonrpc":"2.0","id":1,"method":"deploy","params":{"project_id":1}}' -H"Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H"Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc
curl -X POST -d '{"jsonrpc":"2.0","id":1,"method":"deploy","params":{"project_id":1}}' -H "Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H "Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc
```

#### Example response
#### Example Response

```json
{"jsonrpc":"2.0","result":{"id":11,"project_id":1,"number":11,"task":"deploy","status":null,"message":null,"user_id":1,"created_at":"2016-10-15 18:25:31","updated_at":"2016-10-15 18:25:31"},"id":1}
Expand All @@ -48,19 +48,19 @@ curl -XPOST -d'{"jsonrpc":"2.0","id":1,"method":"deploy","params":{"project_id":

Roll back a project to a previous deployment.

#### Arguments
#### Parameters

|Name|Type|Description|
|---|---|---|
|project_id|integer|Project id.|
| Name | Type | Description |
| --- | --- | --- |
| project_id | integer | Project id. |

#### Example request
#### Example Request

```
curl -XPOST -d'{"jsonrpc":"2.0","id":1,"method":"rollback","params":{"project_id":1}}' -H"Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H"Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc
curl -X POST -d '{"jsonrpc":"2.0","id":1,"method":"rollback","params":{"project_id":1}}' -H "Authorization: Bearer aiSPTQE2nMnmHtyfjZenfI5dcb52zANE30n5t1gL5H2BwPpXz9GIVYKVFE8x" -H "Accept: application/json-rpc" http://webloyer.local/api/v1/jsonrpc
```

#### Example response
#### Example Response

```json
{"jsonrpc":"2.0","result":{"id":13,"project_id":1,"number":13,"task":"rollback","status":null,"message":null,"user_id":1,"created_at":"2016-10-15 18:36:22","updated_at":"2016-10-15 18:36:22"},"id":1}
Expand Down
2 changes: 1 addition & 1 deletion WEBHOOKS.md
Expand Up @@ -6,7 +6,7 @@ Webloyer provide webhooks of GitHub to deploy a project.

### Usage

You must set "Execute By" in Create Project Page.
You must set "Execute By" in Create Project Page.<br>
If you want to use [GitHub webhook secret](https://developer.github.com/webhooks/securing/), you must also set "Secret".

### Endpoint
Expand Down

0 comments on commit 0bf9f86

Please sign in to comment.