- Spin up a new App server, choose PHP 8
- SSH into it and run
sudo -ito become root - Run
pecl install swooleand enable what you need. (I disabled curl as it did not work for me) - Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
- Point your DNS to your new site
- Enable SSL using Lets Encrypt
- Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For use in Chef: | |
| # Adds a command: git-pull-recursive | |
| file "/usr/local/bin/git-pull-recursive" do | |
| owner "root" | |
| group "root" | |
| mode "0755" | |
| action :create | |
| content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mix = require('laravel-mix'); | |
| const s3Plugin = require('webpack-s3-plugin'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Mix Asset Management | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Mix provides a clean, fluent API for defining some Webpack build steps | |
| | for your Laravel application. By default, we are compiling the Sass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function showToasters(){ | |
| // default info toaster with timeout | |
| $this->toaster('your message'); | |
| // makes it persistent | |
| $this->toaster('your message')->persistent(); | |
| // warning toaster with timeout | |
| $this->toaster('your message')->warning(); |
- Spin up a new App server, choose PHP 8
- SSH into it and run
sudo -ito become root - Run
pecl install swooleand enable what you need. (I disabled curl as it did not work for me) - Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
- Point your DNS to your new site
- Enable SSL using Lets Encrypt
- Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // function | |
| function getYoutubeUrlId (url) { | |
| const urlObject = new URL(url); | |
| let urlOrigin = urlObject.origin; | |
| let urlPath = urlObject.pathname; | |
| // Örneğin url https://youtu.be/V-uynt7UXXI ise | |
| if (urlOrigin.search('youtu.be') > -1) { | |
| // substr yapma sebebimiz, youtube kısaltma linklerinde id path'de olur ve pathname başında "/" olur. | |
| // Örneğin "/V-uynt7UXXI" ise "V-uynt7UXXI" return eder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div x-data="{ openTab: 1 }" class="flex flex-col-reverse"> | |
| <div class="hidden mt-6 w-full max-w-2xl mx-auto sm:block lg:max-w-none"> | |
| <div class="grid grid-cols-4 gap-6" aria-orientation="horizontal" role="tablist"> | |
| @foreach ($product->productImages as $productImage) | |
| <button x-on:click="{ openTab = {{ $loop->iteration }} }" id="tabs-1-tab-{{ $loop->iteration }}" | |
| class="relative h-24 bg-white rounded-md flex items-center justify-center text-sm font-medium uppercase text-gray-900 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring focus:ring-offset-4 focus:ring-opacity-50" | |
| aria-controls="tabs-1-panel-{{ $loop->iteration }}" | |
| :tabindex="openTab === {{ $loop->iteration }} ? 0 : -1" | |
| :aria-selected="openTab === {{ $loop->iteration }} ? 'true' : 'false'" | |
| role="tab" |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware | |
| # deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware | |
| deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | |
| # deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware | |
| deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | |
| # deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware | |
| deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware |