diff --git a/composer.json b/composer.json
index 79b0461..ba94891 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,8 @@
"zendframework/zend-json": "3.0.0",
"zendframework/zend-hydrator": "2.2.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": {
"phpunit/phpunit": "^4.8",
diff --git a/composer.lock b/composer.lock
index 1d7b9d7..d5160f0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "205a6bbd450a35d78247da6c3cb34d01",
+ "content-hash": "26537d5a4676e28b7df3a39ea661f76e",
"packages": [
{
"name": "container-interop/container-interop",
@@ -774,6 +774,49 @@
],
"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",
"version": "v1.2.0",
diff --git a/deploy.php b/deploy.php
new file mode 100644
index 0000000..39295a5
--- /dev/null
+++ b/deploy.php
@@ -0,0 +1,54 @@
+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');
diff --git a/public/.htaccess b/public/.htaccess
index a5c4081..a008e99 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -15,3 +15,10 @@ RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
+
+
+ Require all granted
+
+
+ Require all denied
+