* deployer config added
* baseuri helper middleware added
This commit is contained in:
parent
ed29fb7f97
commit
b260fe78d0
@ -15,7 +15,8 @@
|
|||||||
"zendframework/zend-json": "3.0.0",
|
"zendframework/zend-json": "3.0.0",
|
||||||
"zendframework/zend-hydrator": "2.2.1",
|
"zendframework/zend-hydrator": "2.2.1",
|
||||||
"zendframework/zend-filter": "2.7.1",
|
"zendframework/zend-filter": "2.7.1",
|
||||||
"dasprid/container-interop-doctrine": "0.2.3"
|
"dasprid/container-interop-doctrine": "0.2.3",
|
||||||
|
"los/basepath": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8",
|
"phpunit/phpunit": "^4.8",
|
||||||
|
|||||||
45
composer.lock
generated
45
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "205a6bbd450a35d78247da6c3cb34d01",
|
"content-hash": "26537d5a4676e28b7df3a39ea661f76e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "container-interop/container-interop",
|
"name": "container-interop/container-interop",
|
||||||
@ -774,6 +774,49 @@
|
|||||||
],
|
],
|
||||||
"time": "2016-09-25T13:30:27+00:00"
|
"time": "2016-09-25T13:30:27+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "los/basepath",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Lansoweb/basepath.git",
|
||||||
|
"reference": "8a40de843a4c7cf1fdac51d7e33c7dfbcfb08d29"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Lansoweb/basepath/zipball/8a40de843a4c7cf1fdac51d7e33c7dfbcfb08d29",
|
||||||
|
"reference": "8a40de843a4c7cf1fdac51d7e33c7dfbcfb08d29",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"container-interop/container-interop": "~1.1",
|
||||||
|
"php": "^7.0",
|
||||||
|
"psr/http-message": "~1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^5.0",
|
||||||
|
"zendframework/zend-diactoros": "^1.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"LosMiddleware\\BasePath\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Leandro Silva",
|
||||||
|
"homepage": "http://leandrosilva.info/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP middleware to remove a path prefix from request uri",
|
||||||
|
"homepage": "https://github.com/lansoweb/basepath",
|
||||||
|
"time": "2016-08-27T20:56:32+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/fast-route",
|
"name": "nikic/fast-route",
|
||||||
"version": "v1.2.0",
|
"version": "v1.2.0",
|
||||||
|
|||||||
54
deploy.php
Normal file
54
deploy.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
namespace Deployer;
|
||||||
|
require 'recipe/common.php';
|
||||||
|
|
||||||
|
// Configuration
|
||||||
|
|
||||||
|
set('repository', 'https://gogs.ragnarok.yvan.hu/TSP/daily-ci-api.git');
|
||||||
|
set('shared_files', [
|
||||||
|
'config/autoload/local.php',
|
||||||
|
'config/autoload/doctrine.local.php',
|
||||||
|
// 'config/autoload/errorhandler.local.php',
|
||||||
|
]);
|
||||||
|
//set('shared_dirs', [
|
||||||
|
// 'data/attachments',
|
||||||
|
//]);
|
||||||
|
set('writable_dirs', []);
|
||||||
|
set('keep_releases', 3);
|
||||||
|
set('default_stage', 'production');
|
||||||
|
|
||||||
|
// Servers
|
||||||
|
|
||||||
|
server('vasgyuro', 'vasgyuro.tsp')
|
||||||
|
->stage('production')
|
||||||
|
->user('edvidan')
|
||||||
|
->forwardAgent()
|
||||||
|
// ->set('php_service_name', 'php7.1-fpm')
|
||||||
|
->set('deploy_path', '/home/edvidan/applications/daily-ci-api');
|
||||||
|
|
||||||
|
/*
|
||||||
|
desc('Restart PHP-FPM service');
|
||||||
|
task('php-fpm:restart', function () {
|
||||||
|
// The user must have rights for restart service
|
||||||
|
// /etc/sudoers: username ALL=NOPASSWD:/bin/systemctl restart php-fpm.service
|
||||||
|
run('sudo service {{php_service_name}} reload');
|
||||||
|
})->onlyOn('alfheim');
|
||||||
|
after('deploy:symlink', 'php-fpm:restart');
|
||||||
|
*/
|
||||||
|
|
||||||
|
desc('Deploy your project');
|
||||||
|
task('deploy', [
|
||||||
|
'deploy:prepare',
|
||||||
|
'deploy:lock',
|
||||||
|
'deploy:release',
|
||||||
|
'deploy:update_code',
|
||||||
|
'deploy:shared',
|
||||||
|
'deploy:writable',
|
||||||
|
'deploy:vendors',
|
||||||
|
'deploy:clear_paths',
|
||||||
|
'deploy:symlink',
|
||||||
|
'deploy:unlock',
|
||||||
|
'cleanup',
|
||||||
|
]);
|
||||||
|
|
||||||
|
after('deploy', 'success');
|
||||||
@ -15,3 +15,10 @@ RewriteRule ^.*$ - [NC,L]
|
|||||||
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
|
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
|
||||||
RewriteRule ^(.*) - [E=BASE:%1]
|
RewriteRule ^(.*) - [E=BASE:%1]
|
||||||
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
|
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
|
||||||
|
|
||||||
|
<Limit GET POST PUT DELETE HEAD OPTIONS>
|
||||||
|
Require all granted
|
||||||
|
</Limit>
|
||||||
|
<LimitExcept GET POST PUT DELETE HEAD OPTIONS>
|
||||||
|
Require all denied
|
||||||
|
</LimitExcept>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user