Under Progress
THIS APPLICATION IS CONFIDENTIAL AND PROPRIETARY AND DEVELOPED BY xtendum gmbh. THE SOURCE CODE MAY NOT BE REPRODUCED, PUBLISHED, OR DISCLOSED TO OTHERS WITHOUT WRITTEN AUTHORIZATION. COPYRIGHT ©2017 BY xtendum gmbh, Switzerland. ALL RIGHTS RESERVED.
License is granted to licensed party for indefinite time and in a non-restricting way which means licensed party can change, sub-license or sell the application including the source code without any further permission of the author (if not any other restriction of used frameworks and libraries apply).
- Laravel (https://laravel.com): The Laravel framework is open-sourced software licensed under the MIT license.
- VueJS
- Various Packages and Frameworks: see file 'composer.json' and 'package.json' in the root folder.
For any questions please contact
xtendum gmbh
Christian Herter
Egg 79
CH-9103 Schwellbrunn
Switzerland
Email contact@xtendum.com / www.xtendum.com
PROD setup is done in .env file Important settings: APP**, DB*, MAILMAILER=sendmail, VITE_COOKIES_SECURE, LOG, QUEUE_CONNECTION=database See .env.example
For each update/install do the following : IMPORTANT: Consider putting application in maintenance mode first (see above).
IMPORTANT: Make sure PHP version 8.1 is used, e.g. on Hostpoint Server as long as PHP default is not yet used, executed the following php command (or similar, depending on your web server configuration):
/usr/local/php81/bin/php
instead of php
-
Pull from GIT
git pull
-
run composer
php composer.phar update --optimize-autoloader --no-dev
-
run database migration
php artisan migrate
-
run
npm install
-- if npm not available on server, do locally -
run
npm run build
-- if npm not available on server, do locally (make sure env file is set correctly) and publish files in public directory manually -
rebuild caches
php artisan optimize
-
Restart queues
php artisan queue:restart
Other informations:
To clear caches use the following commands:
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
-
Pull from GIT
git pull
-
run composer
Composer install
or
Composer install --ignore-platform-reqs
==> If any platform requirements mismatch -
run Sail build
sudo ./vendor/bin/sail build
==> For the very first time to setup up docker -
run Sail
sudo ./vendor/bin/sail up
-
Generate key
sudo ./vendor/bin/sail artisan key:generate
-
run Migrations
sudo ./vendor/bin/sail artisan migrate
-
run database seed
sudo ./vendor/bin/sail artisan db:seed
-
run
sudo ./vendor/bin/sail npm install
-- if npm not available on sail, do locally -
run
sudo ./vendor/bin/sail npm run dev
-
rebuild caches
sudo ./vendor/bin/sail artisan optimize
or
sudo ./vendor/bin/sail artisan config:cache
sudo ./vendor/bin/sail artisan route:cache
Other informations:
To clear caches (e.g. for local development) use the following commands:
sudo ./vendor/bin/sail artisan config:clear
sudo ./vendor/bin/sail artisan route:clear
sudo ./vendor/bin/sail artisan view:clear
sudo ./vendor/bin/sail artisan cache:clear
To setup a first user you can use tinker or the seed.
Example for superadmin user setup with tinker - Available Roles: user, clientadmin, superadmin (otherwise regular client admin)
sudo ./vendor/bin/sail artisan tinker
$user = new User();
$user->firstname = 'Peter'
$user->lastname = 'Muster'
$user->email = 'p.muster@xtendum.com'
$user->password = bcrypt('12345678')
$user->role = 'superadmin' Or 'admin'
$user->save()
exit
If NPM is not available on server (on hostpoint it isn't), run the following commands locally and afterwards copy all files in directory /public to the same directory on the server
IMPORTANT: If dist files are created locally make sure you have the same env file settings configured for the env variables starting with VITE_ .
-> switch to application root directory and do the following commands:
npm install
-- check on warnings and fix them (e.g. security vulnerabilities)npm run build
-- creates optimized smaller files, for debuging purpose do 'npm run dev'
-
Docker
curl -s https://laravel.build/example-app | bash
==> Linux/Unixcurl -s https://laravel.build/example-app | bash
==> windowscurl -s "https://laravel.build/example-app" | bash
==> Macos -
PHP
https://www.php.net/downloads
-
Composer
https://getcomposer.org/Composer-Setup.exe
==> For Windowshttps://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos
==> For Linux/Unix/Macos -
Node/NPM
PROD - One-time settings for web server (tested on shared hosting of hostpoint.ch, might need adjustments on others) for a fresh install
setup cron job to handle scheduled jobs Cron '* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1'
Example for PROD on hostpoint server Cron job: '* * * * * cd /home/chrigel/www/xtendum/projects/hilti/ordertool/prod && /usr/local/php81/bin/php artisan schedule:run >> /dev/null 2>&1'
git clone git@bitbucket.org:xtendum-services/staff-companion.git dev
(Note: public ssh/rsa key of server user needs to be set as access key in bitbucket.org for repository)- configure laravel .env file (see env.example)
- install composer -- https://getcomposer.org/download/
composer install
-- php composer.phar install (depending on environment you should run php composer.phar update)php artisan migrate
php artisan storage:link
php artisan key:generate
php artisan optimize
php artisan queue:work
- Check database index: e.g. add index to all foreign key
=> If database should contain some dummy data use:
php artisan db:seed