Parcourir la source

Fix PHP version requirement and add an example deployment config

staging
Parent
révision
608a89ef4a
3 fichiers modifiés avec 303 ajouts et 2 suppressions
  1. +2
    -1
      composer.json
  2. +257
    -1
      composer.lock
  3. +44
    -0
      deploy.php

+ 2
- 1
composer.json Voir le fichier

@@ -11,13 +11,14 @@
}
],
"require": {
"php": "^7.4",
"php": ">=7.4",
"laravel/lumen-framework": "^8.0",
"nesbot/carbon": "^2.43",
"knockout/bbcode": "dev-master"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.5",
"deployer/deployer": "^6.8",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"


+ 257
- 1
composer.lock Voir le fichier

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "383a2d2ab44182ee3aa0814ff7b823b9",
"content-hash": "cbec8ecb5a88bf33b6bb34a9d3668ce1",
"packages": [
{
"name": "brick/math",
@@ -4950,6 +4950,134 @@
],
"time": "2020-09-07T19:32:39+00:00"
},
{
"name": "deployer/deployer",
"version": "v6.8.0",
"source": {
"type": "git",
"url": "https://github.com/deployphp/deployer.git",
"reference": "4e243a64ed61e779fbb31c5a74e258a8e52fdaff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/deployphp/deployer/zipball/4e243a64ed61e779fbb31c5a74e258a8e52fdaff",
"reference": "4e243a64ed61e779fbb31c5a74e258a8e52fdaff",
"shasum": ""
},
"require": {
"deployer/phar-update": "~2.2",
"php": "^7.2",
"pimple/pimple": "~3.0",
"symfony/console": "~2.7|~3.0|~4.0|~5.0",
"symfony/process": "~2.7|~3.0|~4.0|~5.0",
"symfony/yaml": "~2.7|~3.0|~4.0|~5.0"
},
"require-dev": {
"phpunit/phpunit": "^8"
},
"bin": [
"bin/dep"
],
"type": "library",
"autoload": {
"psr-4": {
"Deployer\\": "src/"
},
"files": [
"src/Support/helpers.php",
"src/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anton Medvedev",
"email": "anton@medv.io"
}
],
"description": "Deployment Tool",
"homepage": "https://deployer.org",
"support": {
"docs": "https://deployer.org/docs",
"issues": "https://github.com/deployphp/deployer/issues",
"source": "https://github.com/deployphp/deployer"
},
"funding": [
{
"url": "https://github.com/antonmedv",
"type": "github"
},
{
"url": "https://www.patreon.com/deployer",
"type": "patreon"
}
],
"time": "2020-04-25T16:05:31+00:00"
},
{
"name": "deployer/phar-update",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/deployphp/phar-update.git",
"reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/deployphp/phar-update/zipball/9ad07422f2cd43a1382ee8e134bdcd3a374848e3",
"reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/console": "~2.7|~3.0|~4.0|~5.0"
},
"require-dev": {
"mikey179/vfsstream": "1.1.0",
"phpunit/phpunit": "3.7.*",
"symfony/process": "~2.7|~3.0|~4.0|~5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Deployer\\Component\\PharUpdate\\": "src/",
"Deployer\\Component\\PHPUnit\\": "src/PHPUnit/",
"Deployer\\Component\\Version\\": "src/Version/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kevin Herrera",
"email": "kevin@herrera.io",
"homepage": "http://kevin.herrera.io"
},
{
"name": "Anton Medvedev",
"email": "anton@medv.io",
"homepage": "https://medv.io"
}
],
"description": "Integrates Phar Update to Symfony Console.",
"homepage": "https://github.com/deployphp/phar-update",
"keywords": [
"console",
"phar",
"update"
],
"support": {
"issues": "https://github.com/deployphp/phar-update/issues",
"source": "https://github.com/deployphp/phar-update/tree/v2.2.0"
},
"abandoned": true,
"time": "2019-12-12T13:45:57+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.4.0",
@@ -6193,6 +6321,59 @@
],
"time": "2020-12-04T05:05:53+00:00"
},
{
"name": "pimple/pimple",
"version": "v3.3.1",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/21e45061c3429b1e06233475cc0e1f6fc774d5b0",
"reference": "21e45061c3429b1e06233475cc0e1f6fc774d5b0",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
}
},
"autoload": {
"psr-0": {
"Pimple": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Pimple, a simple Dependency Injection Container",
"homepage": "https://pimple.symfony.com",
"keywords": [
"container",
"dependency injection"
],
"support": {
"source": "https://github.com/silexphp/Pimple/tree/v3.3.1"
},
"time": "2020-11-24T20:35:42+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
@@ -7316,6 +7497,81 @@
],
"time": "2020-12-08T17:03:37+00:00"
},
{
"name": "symfony/yaml",
"version": "v5.2.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "290ea5e03b8cf9b42c783163123f54441fb06939"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/290ea5e03b8cf9b42c783163123f54441fb06939",
"reference": "290ea5e03b8cf9b42c783163123f54441fb06939",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<4.4"
},
"require-dev": {
"symfony/console": "^4.4|^5.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"bin": [
"Resources/bin/yaml-lint"
],
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.2.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-12-08T17:02:38+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.0",


+ 44
- 0
deploy.php Voir le fichier

@@ -0,0 +1,44 @@
<?php
namespace Deployer;

require 'recipe/laravel.php';

// Project name
set('application', 'knockout-lite');

// Project repository
set('repository', 'git@git.mos6581.com:Knockout/Knockout-Lite.git');

// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);

// Shared files/dirs between deploys
add('shared_files', []);
add('shared_dirs', []);

// Writable dirs by web server
add('writable_dirs', []);
set('allow_anonymous_stats', false);

// Hosts
host('165.22.47.203')
->user('knockout')
->stage('production')
->set('deploy_path', '/srv/www/{{application}}/production');

host('165.22.47.203')
->user('knockout')
->stage('staging')
->set('deploy_path', '/srv/www/{{application}}/staging');

// Tasks
task('build', function () {
run('cd {{release_path}} && build');
});

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

// Migrate database before symlink new release.
before('deploy:symlink', 'artisan:migrate');


Chargement…
Annuler
Enregistrer