pull/144/head
Saeid 3 years ago
commit 8016196b9a

@ -12,4 +12,4 @@ trim_trailing_whitespace = true
trim_trailing_whitespace = false
[*.yml]
indent_size = 2
indent_size = 2

1
.gitattributes vendored

@ -3,3 +3,4 @@
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore

@ -13,7 +13,7 @@ COPY database /var/www/database
COPY composer-prod.* /var/www/
RUN composer clearcache && COMPOSER=composer-prod.json composer update --no-scripts
RUN composer clearcache && COMPOSER=composer-prod.json composer install --no-scripts
COPY . /var/www
@ -23,3 +23,4 @@ RUN chown -R www-data:www-data \
/var/www/public \
/var/www/storage \
/var/www/bootstrap/cache

61
Jenkinsfile vendored

@ -1,30 +1,41 @@
pipeline {
agent {
node {
label 'willa'
agent {
node {
label 'willa'
}
}
}
stages {
stage('build') {
steps {
sh 'cd /home/administrator/apps/$IMAGE_NAME/;docker build -t registry.willaspace.com/willaspace/$IMAGE_NAME:latest .'
sh 'cd /home/administrator/apps/$IMAGE_NAME/;sudo ./BuildDocker'
}
stages {
stage('build') {
when {
branch 'master'
}
steps {
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest .'
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;sudo ./BuildDocker'
}
}
stage('deploy to production') {
when {
branch 'master'
}
steps {
sh 'cd /home/administrator/apps/${IMAGE_NAME}/ ; docker-compose up -d'
sh 'docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"'
sh 'docker exec willaengine service cron start'
sh 'docker exec willaengine php artisan config:cache'
sh 'docker exec willaengine php artisan route:cache'
}
}
stage('deploy to staging') {
when {
branch 'dev'
}
steps {
sh 'echo ${IMAGE_NAME}-staging comming soon ...'
}
}
}
stage('deploy') {
steps {
sh 'cd /home/administrator/apps/$IMAGE_NAME/ ; docker-compose up -d'
sh 'docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"'
sh 'docker exec willaengine service cron start'
sh 'docker exec willaengine php artisan config:cache'
sh 'docker exec willaengine php artisan route:cache'
}
environment {
IMAGE_NAME = 'willaengine'
}
}
environment {
IMAGE_NAME = 'willaengine'
}
}

@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel
$schedule->command('sms:update:status rahyab')->everyTwoHours();
$schedule->command('domain:update_ssl_expiry_date')->daily(); # update SSL expired_at
$schedule->command('domain:update_domain_expiry_date')->daily(); # update domain expired_at
$schedule->command('make:sitemap')->daily(); # make sitemap
}
/**

@ -2,10 +2,12 @@
namespace App\Exceptions;
use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
use WM\Core\Exceptions\HasRelationException;
use WM\Core\Exceptions\ValidationErrorException;
use WM\Core\Services\Responser;
use WM\WebBuilder\Exceptions\SiteBannedException;
class Handler extends ExceptionHandler
{
@ -31,7 +33,7 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param \Throwable $exception
* @param \Throwable $exception
* @return void
*/
public function report(Throwable $exception)
@ -46,15 +48,20 @@ class Handler extends ExceptionHandler
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Throwable $exception)
{
if ($exception instanceof ValidationErrorException) {
return response()->json(Responser::error($exception->getMessageBody(), $exception->getMessageInfo()), 422);
} elseif ($exception instanceof SiteBannedException) {
return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']);
} elseif ($exception instanceof HasRelationException) {
return response()->json(Responser::error([$exception->getMessage()]), 422);
}
return parent::render($request, $exception);
}
}

@ -12,7 +12,6 @@
"dependencies": {
"@riophae/vue-treeselect": "^0.4.0",
"@tinymce/tinymce-vue": "^3.0.1",
"vue-tinymce-editor": "^1.6.2",
"apexcharts": "^3.27.1",
"axios": "^0.21.1",
"babel-polyfill": "^6.26.0",
@ -45,8 +44,10 @@
"vue-range-component": "^1.0.3",
"vue-router": "^3.0.2",
"vue-select": "^3.11.2",
"vue-tinymce-editor": "^1.6.2",
"vue2-dropzone": "^3.6.0",
"vuetify": "^2.5.4"
"vuetify": "^2.5.4",
"willatoast": "^1.1.1"
},
"devDependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.2.0",

@ -27,6 +27,7 @@ return [
"string" => ":attribute باید بین :min و :max کاراکتر باشد.",
"array" => ":attribute باید بین :min و :max آیتم باشد.",
],
"after_or_equal" => ":attribute باید بزرگتر یا مساوی :date باشد.",
"boolean" => "The :attribute field must be true or false",
"confirmed" => ":attribute با تاییدیه مطابقت ندارد.",
"date" => ":attribute یک تاریخ معتبر نیست.",
@ -109,6 +110,7 @@ return [
*/
'attributes' => [
'today' => 'امروز',
'blog_category_id' => 'دسته بندی',
'slug' => 'نام انگلیسی',
'email' => 'آدرس پست الکترونیکی',

Loading…
Cancel
Save