saeid 4 years ago
commit 06cd5d1912

@ -2,4 +2,4 @@
vendor
node_modules
modules
composer.lock
composer.lock

@ -0,0 +1,38 @@
#!/bin/bash
# rsync script
git pull origin master
cd modules
for f in *
do
cd $f && git pull origin master && cd ..
done
cd ..
npm install
rm -r /home/administrator/apps/willaengine/public/js/vue
npm run production
rm -r /home/administrator/apps/nginx/www/willaengine/public/js/vue
rm -r /home/administrator/apps/nginx/www/willamall/public/js/vue
rm -r /home/administrator/apps/nginx/www/willaarts/public/js/vue
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaengine/public/js/
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willamall/public/js/
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaarts/public/js/
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaengine/public/
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaarts/public/
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaarts/public
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willamall/public
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaengine

@ -4,20 +4,17 @@ WORKDIR /var/www
RUN apt install -y sendmail libpng-dev
RUN docker-php-ext-install gd
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
COPY database /var/www/database
COPY composer.* /var/www/
COPY composer-prod.* /var/www/
RUN composer clearcache && composer update --no-scripts
RUN composer clearcache && COMPOSER=composer-prod.json composer update --no-scripts
COPY . /var/www
RUN php artisan morphmap:cache
RUN chown -R www-data:www-data \
/var/www/public \
/var/www/storage \
/var/www/bootstrap/cache
RUN mv .env.prod .env
RUN php artisan optimize

28
Jenkinsfile vendored

@ -0,0 +1,28 @@
pipeline {
agent {
node {
label 'willa'
}
}
stages {
stage('build') {
steps {
sh 'docker build -t registry.willaspace.com/willaspace/$IMAGE_NAME:latest .'
sh 'cd /home/administrator/apps/$IMAGE_NAME/;sudo ./BuildDocker'
}
}
stage('deploy') {
steps {
sh 'cd /home/administrator/apps/$IMAGE_NAME/ ; docker-compose up -d'
sh 'docker exec willaengine service cron start'
sh 'docker exec willaengine php artisan config:cache'
}
}
}
environment {
IMAGE_NAME = 'willaengine'
}
}

@ -0,0 +1,85 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use WM\Core\Models\Business;
use WM\Core\Models\User;
class UserChangeInformation extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'transport:user';
/**
* The console command description.
*
* @var string
*/
protected $description = 'transport users';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
private function firstNameLengthUpdate(User $user)
{
$fistName = $user->first_name;
$fistNameLength = strlen(utf8_decode($fistName));
$user->update([
'first_name_length' => $fistNameLength
]);
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$users = User::all();
foreach ($users as $user) {
$business = Business::find($user->business_id);
if (!is_null($business)) {
if ($business->user_id == $user->id) {
$this->firstNameLengthUpdate($user);
$business->user()->attach($user->id, [
'responsibility' => $user->responsibility,
'is_owner' => 1
]);
$this->info("add and update user : $user->id");
} else {
$this->firstNameLengthUpdate($user);
$business->user()->attach($user->id, [
'responsibility' => $user->responsibility
]);
$this->info("add and update user : $user->id");
}
}
}
}
}

@ -6,8 +6,8 @@ use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use WM\Common\Services\Sms\Events\SmsSent;
use WM\Common\Services\Sms\Listeners\StoreSmsInDatabase;
use WM\Notification\Services\Sms\Events\SmsSent;
use WM\Notification\Services\Sms\Listeners\StoreSmsInDatabase;
class EventServiceProvider extends ServiceProvider
{

@ -0,0 +1,128 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"nestedset/willaarts": "^5.0.7",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"io-developer/php-whois": "^4.0",
"silber/bouncer": "v1.0.0-rc.10",
"wm/blog": "dev-master",
"wm/common": "dev-master",
"wm/core": "dev-master",
"wm/crm": "dev-master",
"wm/portfolio": "dev-master",
"wm/product": "dev-master",
"wm/service": "dev-master",
"wm/store": "dev-master",
"wm/admin": "dev-master",
"wm/notification": "dev-master",
"zircote/swagger-php": "^3.0"
},
"provide": {
"ext-imagick": "*"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan morphmap:cache"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"repositories": [
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/crm.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/common.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/core.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/blog.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/portfolio.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/product.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/service.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/store.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/notification.git"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/admin.git"
}
]
}

@ -18,6 +18,7 @@
"nestedset/willaarts": "^5.0.7",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"silber/bouncer": "v1.0.0-rc.10",
"io-developer/php-whois": "^4.0",
"wm/blog": "dev-master",
"wm/common": "dev-master",
@ -27,6 +28,7 @@
"wm/product": "dev-master",
"wm/service": "dev-master",
"wm/store": "dev-master",
"wm/admin": "dev-master",
"wm/notification": "dev-master",
"zircote/swagger-php": "^3.0"
},
@ -70,7 +72,8 @@
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
"@php artisan package:discover --ansi",
"@php artisan morphmap:cache"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
@ -82,44 +85,44 @@
"repositories": [
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/crm.git"
"type": "path",
"url": "./modules/wm-crm"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/common.git"
"type": "path",
"url": "./modules/wm-common"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/core.git"
"type": "path",
"url": "./modules/wm-core"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/blog.git"
"type": "path",
"url": "./modules/wm-blog"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/portfolio.git"
"type": "path",
"url": "./modules/wm-portfolio"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/product.git"
"type": "path",
"url": "./modules/wm-product"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/service.git"
"type": "path",
"url": "./modules/wm-service"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/store.git"
"type": "path",
"url": "./modules/wm-store"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/notification.git"
"type": "path",
"url": "./modules/wm-notification"
},
{
"type": "vcs",
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/admin.git"
"type": "path",
"url": "./modules/wm-admin"
}
]
}

11166
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -170,5 +170,5 @@ return [
'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
],
'wm-cdn' => 'https://cdn.willaspace.com',
'wm-cdn' => 'https://cdn.willaspace.com/static.willaengine',
];

Loading…
Cancel
Save