-
Notifications
You must be signed in to change notification settings - Fork 1
Requirements and Installation
t2t2 edited this page Dec 11, 2018
·
1 revision
- Clone the site via git
- Configure the server so that public directory is served
- Get the dependencies
composer installnpm install
- Create a copy
.env.examplecalled.envand set values accordingly in the new file- Make sure to set
APP_ENVto local if developing orproductionif in production. - Also check
configfolder for a bunch more settings
- Make sure to set
- Migrate the database
php artisan migrate - For developing:
- While developing keep gulp watch task running:
npm run dev - Also might be helpful to generate ide helpers file
php artisan ide-helper:generate
- While developing keep gulp watch task running:
- For production:
- Generate assets:
npm run build - Optimize:
php artisan optimize
- Generate assets:
- Generate an user for yourself:
php artisan auth:create - Install server configuration
- Visit
http://<app location>/login
Based on a hybrid between laravel's homestead and h5bp config. Reccomended to use the base h5bp server config
server {
listen [::]:80;
listen 80;
server_name live.example.com;
# Path to files
root /sites/path.to.livehub/public;
index index.php index.html index.htm;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log /var/log/nginx/livehub-access.log;
error_log /var/log/nginx/livehub-error.log error;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
# Uncomment if h5bp base is in use
# include h5bp/basic.conf;
}
crontab -e -u www-data (Change www-data to the user that runs php usually)
* * * * * php /sites/path.to.livehub/artisan schedule:run 1>> /dev/null 2>&1