This is the repository for my personal website.
- Redis
- Composer
- PHP >= 7.2
- MySQL >= 5.7
- Laravel >= 5.8
- Laravel Nova >= 2.0
- ext-curl: *
- ext-json: *
Add Laravel Nova credentials to auth.json
.
composer config http-basic.nova.laravel.com <USERNAME> <PASSWORD>
Install the packages.
composer install
Link storage to public.
php artisan storage:link
Install the dependencies.
npm install
Process and build assets.
npm run prod
Develop in a local environment.
npm run watch
Deploy Script for Laravel Forge
cd /home/pcj/peterchrjoergensen.dk
php artisan down
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
php artisan migrate --force
npm ci
npm run production
php artisan cache:clear
php artisan view:clear
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:cache
( flock -w 10 9 || exit 1
echo 'Restarting FPM...'; sudo -S service php7.2-fpm reload ) 9>/tmp/fpmlock
php artisan up
Replace php7.4-fpm
with the version of PHP installed on the server.
.env.example
represents the environment variables for production.
Sensitive values has been redacted. They must be replaced with their correct values.
Add the following lines to the NGINX configuration to cache assets, media, etc.
# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 1M;
access_log off;
}
# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires 1M;
access_log off;
}
The website is developed using Laravel PHP framework, Composer PHP dependency manager, JQuery JavaScript library, Bootstrap front-end component library and SASS CSS extension language.
For more information on how I developed the website, please visit my blog.
If you would like to contribute by filing an issue or sending a pull request, please feel free to do so.
I would be happy to answer any questions, that you might have regarding the website, via Twitter @tehwave.
© Peter Christian Jørgensen. All Rights Reserved.