NEXT PROJECT
This is NextProject template for Nextbyte laravel projects.
- PHP Web Server (Nginx)
- Postgres Database
-
- Copy .env.example to .env (For Linux: cp .env.example .env ) & .env.example to .env.testing
-
- i) Install all dependent packages using composer (composer install) ii)
-
- (Linux Only) make write permission on the folder storage, bootstrap/cache, .env
-
Steps 4
-
chmod 777 -R storage
-
chmod 777 -R bootstrap
-
chmod 777 -R .env
-
chmod 777 /home/var/www/html
-
- Create the following folders #storage/app/public/application (For linux: mkdir -p storage/app/public/application)
-
- Create a link to the storage directory : php artisan storage:link
(Can be skipped - Step 1 to 3)
-
- Issue the following command,
php artisan tinker
- Issue the following command,
-
-
$c = new \Illuminate\Encryption\Encrypter(config("env.key")); => Illuminate\Encryption\Encrypter {#765}
$c->encrypt("Some Value");
-
-
- To refer to the protected environment use the helper function
sec_env
- To refer to the protected environment use the helper function
[Linux Dependent]
-
- Install Redis (Key-Value Database) CentOS : yum install redis service redis start / systemctl start redis chkconfig redis on git p yum install nodejs (JavaScript runtime)
-
- In the subfolder nodejs in the root directory Install : npm install
-
- NodeJS will be set to listen on port 8890
-
- Install (NodeJS Noarch) (Grunt is a JavaScript library used for automation and running tasks) CentOS : npm install -g grunt
-
-
Install laravel-echo-server npm install -g laravel-echo-server
Issue the following command to initialize laravel echo server configuration laravel-echo-server init
-
Note: (Tested Versions) npm v6.4.0 nodejs v8.11.4
-
- Create file nodejs/Server/config/constants.js Add the following contents var port = "8890"; module.exports.port = port;
- Laravel - Laravel PHP Framework. (Current ver 5.6)
- Composer - PHP Dependency Management.
- MySql - Database Management System.
Not Applied.
We use Git for version control. For the versions available, see the tags on this repository.
This project is licensed to Nextbyte ICT Solutions.
This project work is copyrighted to Nextbyte ICT Solutions.
Change the memory limit in php.ini file memory_limit = 1024M memory_limit = 512M memory_limit = 128M
[program:oas_horizon] process_name=%(program_name)s_%(process_num)02d command=php /var/www/html/oas/artisan horizon autostart=true autorestart=true user=root numprocs=2 redirect_stdout=true redirect_stderr=true stdout_logfile=/var/log/supervisor/oas_horizon.log stdout_logfile_maxbytes=1MB stderr_logfile=/var/log/supervisor/oas_horizon_stderr.log stderr_logfile_maxbytes=1MB
[program:oas_echo_server] process_name=%(program_name)s_%(process_num)02d directory=/var/www/html/tbs_oas command=laravel-echo-server start autostart=true autorestart=true user=gwanchi/linux_user numprocs=1 redirect_stdout=true redirect_stderr=true stdout_logfile=/var/log/supervisor/oas_echo_server.log stdout_logfile_maxbytes=1MB stderr_logfile=/var/log/supervisor/oas_echo_server_stderr.log stderr_logfile_maxbytes=1MB
For CentOS : Make sure that cronie & cronie-anacron is installed by issuing the following command
rpm -q cronie cronie-anacron
Edit file /etc/crontab, add the following entry
-
-
-
-
- {user} php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
-
-
-
This system use the php date format Y-n-j or optionally Y-m-d, and use the helper function fix_form_date to convert the date into format YYYY-MM-DD before saving into the database.
##Sample Seeds Enable Users Seed Default User email : admin@tbs-oas.go.tz password : TBSOASadmin