Git Product home page Git Product logo

bizzmo_web's Introduction

Bizzmo

Based on laravel framework

Useful links

https://aws.amazon.com/premiumsupport/knowledge-center/monitor-vpn-with-cloudwatch-alarms/

Environment Preparation

  • In bizzmo directory:

    • Copy .env.local file and rename it to .env
    • Change config for username and password of database to be homestead and secret respectively in .env file
    • Move / Copy Vagrantfile to Homestead directory and override the existing one
  • In Homestead directory:

    • Change database name to projectx in Homestead.yaml file under databases section
    • Change map value under folders section to be the path of bizzmo directory
    • vagrant up --provision
    • vagrant ssh
    • cd code
    • composer install
    • composer update
    • npm install
    • Run Migrations: php artisan migrate
    • Run Seeds: php artisan db:seed
  • To set any environment variable for ubuntu machine cmd: echo "export VAR_NAME=var_value" >> ~/.profile

  • To make your new environment variables active in the same shell, run source ~/.profile

SAP Preparation

  • In Homestead directory:
    • Copy nwrfcsdk directory downloaded from SAP to Homestead directory
    • Clone php7-sapnwrfc
     git clone https://github.com/gkralik/php7-sapnwrfc.git

SAP Manual Installation [In case Vagrantfile in the repo is not used]

  • You should copy nwrfcsdk dir under /usr dir, e.g. /usr/sap/nwrfcsdk

  • You may need to install php7.2-dev

     sudo apt-get update 
     sudo apt install php7.2-dev
  • Then run the following commands:

     cd php7-sapnwrfc/
     phpize
     ./configure
     make
     sudo make install
     sudo bash -c 'echo "/usr/sap/nwrfcsdk/lib" > /etc/ld.so.conf.d/nwrfcsdk.conf'
     sudo ldconfig
  • Append: extension=sapnwrfc.so to php.ini file under [PHP] Section

     sudo nano /etc/php/7.2/cli/php.ini

    [OPTIONAL STEPS]

    • To make sure extension is properly installed, run php -m | grep "sap", you should see sapnwrfc in the output
    • You should also be able to run php -v without any errors

SAP installation for php-fpm

  • Create sapnwrfc.ini file under mods-avaiable directory
     cd /etc/php/<VERSION>/mods-avaiable
     touch sapnwrfc.ini
  • Append extension=sapnwrfc.so to sapnwrfc.ini file
  • Check available modules for web requests, we can check out the fpm section, and specifically the conf.d directory
     ls -lah /etc/php/<VERSION>/conf.d
  • Add new symlinks to the mods-available/sapnwrfc.ini
     sudo ln -s /etc/php/<VERSION>/mods-available/sapnwrfc.ini /etc/php/<VERSION>/fpm/conf.d/20-sapnwrfc.ini
  • Now if you check the last command again you can see new link created to /etc/php/<VERSION>/mods-available/sapnwrfc.ini
     ls -lah /etc/php/<VERSION>/conf.d
  • Reload php-fpm service
     sudo service php<VERSION>-fpm reload

Artisian Commands

  • Create new migration

     php artisan make:migration {{Migration Name}}
  • Create DB seed

     php artisan make:seeder {{Seed Name}}
  • Rolling back migrations and re-migrate a limited number of migrations

     php artisan migrate:refresh --step={{Number of Migrations}}

Schedule

  • To start laravel task scheduling on ubuntu you need to add a cron job
     	crontab -e
  • to open your cron job file, then add
     	* * * * * php /var/www/stockhit/artisan schedule:run 1>> /dev/null 2>&1
  • This Cron will call the Laravel command scheduler every minute. Then, Laravel evaluates your scheduled tasks and runs the tasks that are due.

Faced issues

  • When you run the DB seed command

    php artisan db:seed

    and get this error [ReflectionException] Class *****Seeder does not exist. you need to run the following command to generate a new class map

    composer dump-autoload

    then run the DB seed command again

  • SapConnection Class not found error, run the following commands: sh sudo ldconfig sudo service php<VERSION>-fpm reload

  • When you run config clear

    php artisan config:clear

    after which you get the 'class config not found' error when you try to run the site. Delete config.php from {root}/bootstrap/cache and then run

    php artisan optimize

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.