Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 8.x update #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
78 changes: 67 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,74 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://localhost
## Warden Config
WARDEN_ENV_NAME=webloyer
WARDEN_ENV_TYPE=laravel
WARDEN_WEB_ROOT=/

DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
TRAEFIK_DOMAIN=webloyer.test
TRAEFIK_SUBDOMAIN=app

MARIADB_VERSION=10.4
NODE_VERSION=12
COMPOSER_VERSION=2
PHP_VERSION=7.4
PHP_XDEBUG_3=1

WARDEN_DB=1
WARDEN_REDIS=0

## Laravel Config
APP_URL=https://app.webloyer.test

APP_ENV=production
APP_DEBUG=false

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=webloyer2
DB_USERNAME=root
DB_PASSWORD=root

DB_DRIVER=mysql

APP_NAME=Laravel
APP_KEY=base64:IEEIwZK+NyttWIUr9gWOmb0P0O4JqsNufZW5EleQerQ=

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
11 changes: 9 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
58 changes: 55 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
/vendor
/node_modules
.env
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/
vendor/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
target/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

# Webloyer Application files
deploy/.ssh/
*.out
*.swp
.env
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

27 changes: 9 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Webloyer

[![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)<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)

Webloyer is a Web UI for managing [Deployer](https://github.com/deployphp/deployer) deployments.

## Features
Expand All @@ -29,6 +22,7 @@ Webloyer has the following features:
* Web APIs
* Webhooks
* GitHub
* Bitbucket

## Screenshots

Expand All @@ -38,14 +32,20 @@ See [screenshots](/SCREENSHOTS.md).

Webloyer has the following requirements:

* PHP >= 5.6.0
* PHP >= 7.4.0
* OpenSSL PHP Extension
* PDO PHP Extension
* Mbstring PHP Extension
* Tokenizer PHP Extension

## Installation

### Local install with warden
clone project and rename .env.local file into .env file, then execute the following command:
```
warden env up -d --build
```

### Option 1: Download Source Code

1. Download the application source code by using the Composer `create-project` command:
Expand All @@ -72,10 +72,7 @@ Webloyer has the following requirements:
* * * * * php /path/to/webloyer/artisan schedule:run >> /dev/null 2>&1
```
**Note:** You must be running this Cron entry as your web server user.

### Option 2: Using Docker

You can also install using [Webloyer Docker](https://github.com/ngmy/webloyer-docker).
6. Generate webloyer ssh key (used for server authentication fallback) at ~/.ssh/id_rsa and add to each server's authorized_keys

## Basic Usage

Expand Down Expand Up @@ -111,9 +108,3 @@ Webloyer uses [Laravel](http://laravel.com/) as a foundation PHP framework.
## License

Webloyer is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

## Donation

Do you want to buy me a coffee?

[![Flattr this](https://button.flattr.com/flattr-badge-large.png "Flattr this")](https://flattr.com/submit/auto?fid=513grl&url=https%3A%2F%2Fgithub.com%2Fngmy%2Fwebloyer)
20 changes: 19 additions & 1 deletion WEBHOOKS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Webhooks

Webloyer provide webhooks of GitHub to deploy a project.
Webloyer provide webhooks of GitHub and Bitbucket to deploy a project.

## Bitbucket

### Usage

You must set "Execute By" in Create Project Page.<br>
If you want to use a secret key, you must also set "Secret" and specify it as GET parameter on payload url.
Ex:
- Secret key: deploykey
- Secret Base 64 Encode: ZGVwbG95a2V5
- Result: https://www.mydeploy.site/webhook/bitbucket/v1/projects/1/deployments?secret=ZGVwbG95a2V5

### Endpoint

```
/webhook/bitbucket/v1/projects/:project_id/deployments
```


## GitHub

Expand Down
4 changes: 4 additions & 0 deletions app/Console/Commands/Inspire.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;

/**
* Class Inspire
* @package App\Console\Commands
*/
class Inspire extends Command
{
/**
Expand Down
22 changes: 16 additions & 6 deletions app/Console/Commands/Webloyer/DiscardOldDeployments.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);

namespace App\Console\Commands\Webloyer;

Expand All @@ -8,6 +9,10 @@
use DB;
use DateTime;

/**
* Class DiscardOldDeployments
* @package App\Console\Commands\Webloyer
*/
class DiscardOldDeployments extends Command
{
/**
Expand All @@ -24,15 +29,20 @@ class DiscardOldDeployments extends Command
*/
protected $description = 'Discard old deployments';

protected $projectRepository;
/**
* @var ProjectInterface
*/
protected ProjectInterface $projectRepository;

protected $spec;
/**
* @var OldDeploymentSpecification
*/
protected OldDeploymentSpecification $spec;

/**
* Create a new command instance.
*
* @param \App\Repositories\Project\ProjectInterface $projectRepository
* @return void
* DiscardOldDeployments constructor.
* @param ProjectInterface $projectRepository
* @throws \Exception
*/
public function __construct(ProjectInterface $projectRepository)
{
Expand Down
Loading