From 9599fae91c6d0bd3425b303fe3f5cf636ea0ec34 Mon Sep 17 00:00:00 2001 From: Dillon Date: Thu, 24 Aug 2023 06:57:51 +0800 Subject: [PATCH] Migrate source code from personal account to CIEF's (round 2) --- .vscode/launch.json | 16 +++ Jenkinsfile | 49 +++++++++ .../ControllersLogic/CreateCustomerLogic.php | 2 +- .../ControllersLogic/RenderDocumentLogic.php | 10 +- .../Services/ConvertsBase64ToFile.php | 11 +- .../AWS/AWSImageUploadController.php | 102 ++++++++++++++++++ app/Providers/AppServiceProvider.php | 4 +- docker-setup/Dockerfile | 15 ++- docker-setup/docker-compose.yml | 1 + docker-setup/nginx/default.conf | 7 ++ docker-setup/php/default.conf | 8 ++ package.json | 1 + resources/assets/vue/app.js | 7 +- .../sections/OnboardingSectionComponent.vue | 4 +- .../NewServiceAnnouncementComponent.vue | 2 +- .../assets/vue/vuex/modules/crudRequest.js | 7 +- resources/views/layouts/base_debug.blade.php | 23 ++++ .../views/layouts/base_debug_child.blade.php | 26 +++++ .../views/pages/aws_image_upload.blade.php | 45 ++++++++ resources/views/pages/billings.blade.php | 30 ++---- resources/views/partials/footer.blade.php | 4 +- routes/company.php | 3 +- routes/currency.php | 2 +- routes/web.php | 54 ++++++---- vapor.yml | 14 ++- 25 files changed, 387 insertions(+), 60 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 Jenkinsfile create mode 100644 app/Http/Controllers/AWS/AWSImageUploadController.php create mode 100644 docker-setup/php/default.conf create mode 100644 resources/views/layouts/base_debug.blade.php create mode 100644 resources/views/layouts/base_debug_child.blade.php create mode 100644 resources/views/pages/aws_image_upload.blade.php diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..ae145ac7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [{ + "name": "Listen for XDebug on Docker", + "type": "php", + "request": "launch", + "port": 9002, + "pathMappings": { + "/var/www/html": "${workspaceFolder}", + }, + "log": true + }] +} diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..c436b9fe --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,49 @@ +// Webhook + Gitlab git pull + Vapor + +def payload = readJSON text: "${payload}" +String userName = payload.user_name +String userEmail = payload.user_email +String httpUrl = payload.project.http_url + + +pipeline { + agent { + docker { + image 'dillonngo/docker-based-image:poc' + args "--group-add 992 -v /var/run/docker.sock:/var/run/docker.sock" + } + } + environment { + HOME = '.' + } + stages { + stage('Download source code from Git') { + steps { + git( + url: httpUrl, + credentialsId: 'gitlab-jenkins-localhost', + branch: 'dillon/jenkins-aws-s3-34' + ) + } + } + + stage('Install') { + steps { + sh 'composer update' + } + } + + stage('Tests') { + steps { + sh 'vendor/bin/phpunit tests/Unit' + } + } + + stage('Deploy') { + steps { + sh 'vendor/bin/vapor deploy production --message="Test Jenkins"' + } + } + + } +} diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php index 0e920fe9..541fa51c 100644 --- a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php +++ b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php @@ -123,7 +123,7 @@ class CreateCustomerLogic extends AbstractControllerLogic CreatePerfexCRMCustomer::dispatch($createLeadPerfexCRMObject); } - $this->generateEmailVerificationAttemptProcessor->execute($user); + // $this->generateEmailVerificationAttemptProcessor->execute($user); //cief todo return $this->response($this->authenticationProcessor->execute($request)); diff --git a/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php b/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php index 2d095750..8b314dbc 100644 --- a/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php +++ b/app/Classes/Modules/Documents/ControllersLogic/RenderDocumentLogic.php @@ -54,11 +54,17 @@ class RenderDocumentLogic extends AbstractControllerLogic $this->canRenderDocument->passes(); - if(!Storage::disk('documents')->exists($file)) + // if(!Storage::disk('documents')->exists($file)) + // { + // throw new ResourceNotFoundException(); + // } + + // return $this->response(['src' => explode('.', $file)[1] == 'pdf' ? chunk_split(base64_encode(Storage::disk('documents')->get($file))) : Storage::disk('documents')->get($file) ]); + if(!Storage::disk('s3')->exists($file)) { throw new ResourceNotFoundException(); } return $this->response(['src' => explode('.', $file)[1] == 'pdf' ? chunk_split(base64_encode(Storage::disk('documents')->get($file))) : Storage::disk('documents')->get($file) ]); } -} \ No newline at end of file +} diff --git a/app/Classes/Modules/Documents/Services/ConvertsBase64ToFile.php b/app/Classes/Modules/Documents/Services/ConvertsBase64ToFile.php index 8741b823..17ae0d31 100644 --- a/app/Classes/Modules/Documents/Services/ConvertsBase64ToFile.php +++ b/app/Classes/Modules/Documents/Services/ConvertsBase64ToFile.php @@ -99,12 +99,15 @@ class ConvertsBase64ToFile */ private function generateFile(FileObject $file, string $suffix = '') { - $filePath = $this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension(); + // $filePath = $this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension(); - Storage::disk('documents')->put($filePath, $file->getDecodedData()); + // Storage::disk('documents')->put($filePath, $file->getDecodedData()); + // return $filePath; + + $filePath = 'localhost/'.$file->getFileName().$suffix.'.'.$file->getExtension(); + Storage::put($filePath, $file->getDecodedData(), 's3'); return $filePath; - } /** @@ -122,4 +125,4 @@ class ConvertsBase64ToFile ]); } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/AWS/AWSImageUploadController.php b/app/Http/Controllers/AWS/AWSImageUploadController.php new file mode 100644 index 00000000..f034b3a1 --- /dev/null +++ b/app/Http/Controllers/AWS/AWSImageUploadController.php @@ -0,0 +1,102 @@ +validate([ + 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', + ]); + + $imageName = time().'.'.$request->image->extension(); + + $request->image->storeAs('images', $imageName); + + //cief todo: checking if storage disk exist + if (Storage::disk('documents')) { + $check1 = "The disk documents exists."; + } else { + $check1 = "The disk documents does not exist."; + } + + // $diskNames = Storage::diskNames(); + + // if (count($diskNames) > 0) { + // $check2 = "The following disks are configured: " . implode(', ', $diskNames); + // } else { + // $check2 = "No storage disks are configured."; + // } + + + if (Storage::disk('public')) { + $check2 = "The disk public exists."; + } else { + $check2 = "The disk public does not exist."; + } + + if (Storage::disk('local')) { + $check3 = "The disk local exists."; + } else { + $check3 = "The disk local does not exist."; + } + + + return redirect()->back() + ->with('success','You have successfully upload image.') + ->with('image',$imageName) + ->with('check1', $check1) + ->with('check2', $check2) + ->with('check3', $check3); + } + + + public function displayImage($fileName) + { + // dd($fileName); + + //1. + // $path = 'images/'.$fileName; + // $url = Storage::url($path); + // $url = Storage::temporaryUrl('file.jpg', now()->addMinutes(5)); + // return $url; + + + //2 + // $path = 'images/'.$fileName; + // // if(Storage::disk('s3')->exists($path)){ + // return Storage::disk('s3')->get($path); + // // } + // return null; + + + //original + $path = 'images/'.$fileName; + $file = Storage::get($path); + $type = Storage::mimeType($path); + + $response = Response::make($file, 200); + $response->header("Content-Type", $type); + return $response; + + // $path = 'images/'.$fileName; + // return Storage::temporaryUrl($path, now()->addMinutes(5)); + } + +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8802ed7a..4aeff6bd 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -24,6 +24,8 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + if (!file_exists(storage_path('framework/sessions'))) { + mkdir(storage_path('framework/sessions'), 0777, true); + } } } diff --git a/docker-setup/Dockerfile b/docker-setup/Dockerfile index 13ce0249..71255f30 100644 --- a/docker-setup/Dockerfile +++ b/docker-setup/Dockerfile @@ -2,6 +2,8 @@ FROM php:7.4-fpm WORKDIR /var/www/html +RUN pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug + RUN docker-php-ext-install pdo pdo_mysql RUN apt-get update && apt-get install -y \ @@ -25,4 +27,15 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - RUN apt-get -y install nodejs RUN chown -R www-data:www-data /var/www -RUN chmod 755 /var/www \ No newline at end of file +RUN chmod 755 /var/www + +# Configure xdebug +RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.remote_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.remote_port=9002" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.idekey=VSCODE" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + +# Moved to docker-setup folder +# RUN echo 'pm.max_children = 15' >> /usr/local/etc/php-fpm.d/zz-docker.conf && \ +# echo 'pm.max_requests = 500' >> /usr/local/etc/php-fpm.d/zz-docker.conf diff --git a/docker-setup/docker-compose.yml b/docker-setup/docker-compose.yml index deb02207..9e33f109 100644 --- a/docker-setup/docker-compose.yml +++ b/docker-setup/docker-compose.yml @@ -44,6 +44,7 @@ services: container_name: exchange-php volumes: - ../:/var/www/html + - ./php/default.conf:/usr/local/etc/php-fpm.d/zz-docker.conf ports: - "9002:9000" networks: diff --git a/docker-setup/nginx/default.conf b/docker-setup/nginx/default.conf index b594e701..c1811261 100644 --- a/docker-setup/nginx/default.conf +++ b/docker-setup/nginx/default.conf @@ -23,6 +23,13 @@ server { fastcgi_intercept_errors on; fastcgi_keep_conn on; fastcgi_param PHP_VALUE "auto_prepend_file= \n allow_url_include=Off"; + + # Xdebug configuration + # fastcgi_param XDEBUG_MODE debug; + # fastcgi_param XDEBUG_CLIENT_HOST host.docker.internal; + # fastcgi_param XDEBUG_CLIENT_PORT 9002; + # fastcgi_param XDEBUG_IDE_KEY VSCODE; + proxy_send_timeout 3600; proxy_read_timeout 3600; fastcgi_send_timeout 3600; diff --git a/docker-setup/php/default.conf b/docker-setup/php/default.conf new file mode 100644 index 00000000..dced3233 --- /dev/null +++ b/docker-setup/php/default.conf @@ -0,0 +1,8 @@ +[global] +daemonize = no + +[www] +listen = 9000 + +pm.max_children = 15 +pm.max_requests = 500 diff --git a/package.json b/package.json index 5d4b92bf..68b4b646 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "jquery": "^3.2", "jquery.scrollbar": "^0.2.11", "jwt-decode": "^3.1.2", + "laravel-vapor": "^0.6.0", "noty": "^3.2.0-beta", "perfect-scrollbar": "^1.5.0", "popper.js": "^1.12", diff --git a/resources/assets/vue/app.js b/resources/assets/vue/app.js index abb7a17e..f2aba812 100644 --- a/resources/assets/vue/app.js +++ b/resources/assets/vue/app.js @@ -28,6 +28,10 @@ import { debounce } from 'vue-debounce' import Avatar from 'vue-avatar'; +import Vapor from 'laravel-vapor'; +// Vapor.withBaseAssetUrl(import.meta.env.VITE_VAPOR_ASSET_URL); +window.Vapor = Vapor; + /** Application Injections */ Vue.use(vuelidate); Vue.use(VueTheMask); @@ -36,7 +40,8 @@ Vue.use(filters); Vue.directive('closable', closable); Vue.mixin({ methods: { - route: route + route: route, + asset: window.Vapor.asset }, mixins: [request, crudHandler] }); diff --git a/resources/assets/vue/components/accounts/sections/OnboardingSectionComponent.vue b/resources/assets/vue/components/accounts/sections/OnboardingSectionComponent.vue index 5f2fb8e9..f41485f7 100644 --- a/resources/assets/vue/components/accounts/sections/OnboardingSectionComponent.vue +++ b/resources/assets/vue/components/accounts/sections/OnboardingSectionComponent.vue @@ -13,7 +13,7 @@
- +
@@ -98,4 +98,4 @@ }, mixins: [componentHandler] } - \ No newline at end of file + diff --git a/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue b/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue index ebcf3851..f8e2c18e 100644 --- a/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue +++ b/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue @@ -5,7 +5,7 @@
- +
diff --git a/resources/assets/vue/vuex/modules/crudRequest.js b/resources/assets/vue/vuex/modules/crudRequest.js index 022d3526..1bb07e78 100644 --- a/resources/assets/vue/vuex/modules/crudRequest.js +++ b/resources/assets/vue/vuex/modules/crudRequest.js @@ -7,8 +7,13 @@ export default { let encodedParams = queryParams.toString(); let filteredEncodedParams = encodedParams.replace(/%3D/g,'='); filteredEncodedParams = filteredEncodedParams.replace(/%26/g,'&'); - console.log('filteredEncodedParams: ', filteredEncodedParams); + console.log('filteredEncodedParams: ', filteredEncodedParams); console.log('queryDomain: ', queryDomain); + let combinedAbsoluteUrl = queryDomain; + if(filteredEncodedParams !== undefined && filteredEncodedParams !== 'undefined'){ + combinedAbsoluteUrl = queryDomain + '?' + filteredEncodedParams; + console.log('combinedAbsoluteUrl: ', combinedAbsoluteUrl); + } return fetch(queryDomain + '?' + filteredEncodedParams, { method: method, responseType: 'json', diff --git a/resources/views/layouts/base_debug.blade.php b/resources/views/layouts/base_debug.blade.php new file mode 100644 index 00000000..2fe79fba --- /dev/null +++ b/resources/views/layouts/base_debug.blade.php @@ -0,0 +1,23 @@ + + + + @include('vendor/head') + + + + + + +
+
+ @yield('content') +
+ @include('vendor/js') + @stack('scripts') + + diff --git a/resources/views/layouts/base_debug_child.blade.php b/resources/views/layouts/base_debug_child.blade.php new file mode 100644 index 00000000..6c44eee0 --- /dev/null +++ b/resources/views/layouts/base_debug_child.blade.php @@ -0,0 +1,26 @@ +@extends('layouts.base_debug') + +@section('content') + + @include('partials.header') +
+
+
+
+
+
+ @yield('inner_content') +
+
+
+
+ @include('partials.footer') +
+
+ +@endsection diff --git a/resources/views/pages/aws_image_upload.blade.php b/resources/views/pages/aws_image_upload.blade.php new file mode 100644 index 00000000..76c53d81 --- /dev/null +++ b/resources/views/pages/aws_image_upload.blade.php @@ -0,0 +1,45 @@ +@extends('layouts.base_portal') +@section('inner_content') +
+
+
+

Session: {{ session('image') }}

+

check1: {{ session('check1') }}

+

check2: {{ session('check2') }}

+

check3: {{ session('check3') }}

+ @if ($message = session('success')) +
+ + {{ $message }} +
+ + @endif + + @if (count($errors) > 0) +
+ Whoops! There were some problems with your input. +
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif + + +
+ @csrf +
+
+ +
+ +
+ +
+
+
+
+
+
+@endsection diff --git a/resources/views/pages/billings.blade.php b/resources/views/pages/billings.blade.php index 4bc012d5..24d8f6a9 100644 --- a/resources/views/pages/billings.blade.php +++ b/resources/views/pages/billings.blade.php @@ -100,32 +100,24 @@ -
-
+
+
-
-
- - - -
-
- - - -
-
+
+
+ +
+
+ +
+ -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index 89caae21..0ace7afd 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -3,9 +3,9 @@
- Copyright © {{ date('Y') }} CIEF Exchange. All rights reserved. + Copyright © {{ date('Y') }} CIEF Exchange. All rights reserved. Powered by Laravel Vapor.
- \ No newline at end of file + diff --git a/routes/company.php b/routes/company.php index 6571daa4..0bd96f20 100644 --- a/routes/company.php +++ b/routes/company.php @@ -8,7 +8,8 @@ Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Compani Route::post('/create', 'CreateCompanyController@create')->name('create'); Route::put('/update/{id}', 'UpdateCompanyController@update')->name('update'); Route::put('update/{id}/status', 'UpdateCompanyStatusController@update')->name('status.update'); - Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('delete'); + // Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('delete'); + Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('destroy'); Route::put('/name-and-debtor/update/{id}', 'UpdateCompanyNameAndDebtorController@update')->name('update.nameAndDebtor'); Route::put('/update/debtor/{id}', 'UpdateCompanyDebtorController@update')->name('delete'); diff --git a/routes/currency.php b/routes/currency.php index b621aad6..ba55c9a2 100644 --- a/routes/currency.php +++ b/routes/currency.php @@ -1,4 +1,4 @@ - null, 'booking' => null ]); -})->name('support'); +})->name('support.fetch'); //duplicate name Route::post('/support', function (Request $request) { @@ -147,7 +147,7 @@ Route::post('/support', function (Request $request) { 'booking' => $booking, ]); -})->name('support'); +})->name('support'); //duplicate name Route::get('/online_payment/redirect', 'Billplz\CallbackBillplzController@callback')->name('online_payment.redirect'); @@ -159,7 +159,7 @@ Route::get('/export/customers/leads', 'Exports\ExportCustomersToExcelController@ Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) { return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']); -})->name('products.random'); +})->name('products.random.1'); //duplicate name Route::get('/fix_bills', function () { ini_set('max_execution_time', '1000000'); @@ -188,7 +188,7 @@ Route::get('/fix_bills', function () { } -})->name('products.random'); +})->name('products.random.2'); //duplicate name Route::get('/wallet/{marking}/details', function ($marking) { $id = \App\Models\Company::where('reference', '=', $marking)->first()->id; @@ -226,7 +226,7 @@ Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsP })->get(); dd($bookings->count()); return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']); -})->name('products.random'); +})->name('products.random.3'); Route::get('/auto-purchase-order-fill', 'Bookings\AutoPurchaseOrderFillController@auto')->name('assign'); @@ -467,24 +467,24 @@ Route::get('/1688/fix/{reference}', function($reference){ // // (App()->make(createPurchaseOrderFor1688OrderProcessor::class))->execute($document->owner); // } -})->name('ecommerce.fix'); +})->name('ecommerce.fix'); //duplicate name -Route::get('/po/manual/fix', function(){ +// Route::get('/po/manual/fix', function(){ -// $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){ -// return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); -// })->get(); -// -// foreach ($bookings as $booking){ -// $booking->status = ApprovalStatus::APPROVED; -// $booking->save(); -// -// $booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); -// $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]); -// -// } +// // $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){ +// // return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); +// // })->get(); +// // +// // foreach ($bookings as $booking){ +// // $booking->status = ApprovalStatus::APPROVED; +// // $booking->save(); +// // +// // $booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); +// // $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]); +// // +// // } -})->name('ecommerce.fix'); +// })->name('ecommerce.fix'); //duplicate name Route::get('/payment/check', function(){ @@ -600,4 +600,16 @@ Route::get('/po/outsource/check', function(){ Route::get('/upload-honey-trap', function () { return view('pages.honey_trap'); -})->name('upload_honey_trap'); \ No newline at end of file +})->name('upload_honey_trap'); + +Route::get('/aws-image-upload', 'AWS\AWSImageUploadController@imageUpload')->name('aws.image.upload'); +Route::post('/aws-image-upload', 'AWS\AWSImageUploadController@imageUploadPost')->name('aws.image.upload.post'); +Route::get('/aws-image/{filename}', 'AWS\AWSImageUploadController@displayImage')->name('aws.image.displayImage'); + +Route::get('/token', function (Request $request) { + $token = $request->session()->token(); + echo $token; + $token = csrf_token(); + echo $token; + +}); diff --git a/vapor.yml b/vapor.yml index b3150f04..d364dc8e 100644 --- a/vapor.yml +++ b/vapor.yml @@ -1,18 +1,28 @@ -id: 46771 +id: 48019 name: vapor-laravel-poc separate-vendor: true environments: production: + domain: staging.izyim.com memory: 1024 cli-memory: 512 database: vapor-laravel-poc-db + storage: exchange-2.0-replica + # gateway-version: 2 + # cache: vapor-laravel-poc-cache runtime: 'docker' - timeout: 600 + timeout: 180 build: - 'composer update' - 'npm install' - 'npm run dev' - 'gulp build' # - 'rm -rf node_modules' + # - 'php artisan optimize' + # # - 'php artisan config:clear' + # - 'php artisan key:generate' + # - 'php artisan config:cache' + # - 'php artisan route:cache' + # - 'php artisan view:cache' deploy: - 'php artisan migrate --force'