https://media.notthebee.com/articles/6418778b6bbe46418778b6bbe6.jpg
Dr. Fauci is on another one of his publicity tours, this time in DC with Mayor Muriel Bowser to guilt poor people into taking his experimental jab.
Not the Bee
Just another WordPress site
https://media.notthebee.com/articles/6418778b6bbe46418778b6bbe6.jpg
Dr. Fauci is on another one of his publicity tours, this time in DC with Mayor Muriel Bowser to guilt poor people into taking his experimental jab.
Not the Bee
https://www.alloutdoor.com/wp-content/uploads/2023/03/How-Has-the-Hunting-Rifle-Evolved-Over-the-Last-300-Years-Img-1.jpg
Modern humans have been around for thousands of years, so guns are a relatively new tool. The first firearm goes back to around the 10th century in China, where fire lances used bamboo and gunpowder to launch spears. Now, there are numerous types of guns for various recreational uses, with hunting among the top activities. Rifles have been the gun of choice for hunters for nearly 300 years. How did the modern hunting rifle make it here?
Nowadays, the standard for hunting rifles centers around models like the current hunting rifle from Christensen Arms. But to understand rifles in 2023, you’ll have to go back to the early 1700s.
North America was growing with European settlers from England, France, Spain and more. Though, the Germans inspired the first rifle — the Pennsylvania rifle. This firearm was an upgrade over the musket because it had a much better range. The Pennsylvania rifle drew inspiration from jäger rifles used in German hunting, which started at around 54 inches long but could expand to over 6 feet.
The Pennsylvania rifle — also known as the Kentucky rifle — was successful in the American colonies and led to similar models in the 18th century. For example, gunsmith Medad Hills crafted fowling pieces for hunting. Hills produced guns in Connecticut and helped hunters by creating long-barreled guns for increased accuracy. He later served in the Revolutionary War and made muskets for Connecticut in 1776.
After the Revolutionary War, rifle manufacturing began to take off in the United States, starting with the plains rifles. The new Americans began to expand westward and used plains rifles on the flat lands. Also known as the Hawken rifle, the plains rifle was shorter than its Pennsylvania predecessor but had a larger caliber, typically starting at .50. They were popular among hunters and trappers who needed to take down large animals from a distance.
A few decades later, the country broke out into a civil war. This era used military rifles from manufacturers like Springfield. However, it wasn’t until after the war that you’d see the hunting rifle that would inspire hunting rifles for decades.
Winchester was critical for late 19th-century rifles, starting with its 1876 model. This rifle was among the most high-powered yet for hunters. The Winchester 1876 was among the earliest repeaters and it had powerful capabilities with sizable ammunition — the intense bullets were necessary to take down large game like buffalo.
The success of the 1876 model led Winchester to create the 1895. This rifle was a repeater that featured smokeless rounds. Unlike its predecessors, the 1895 model was innovative because it included a box magazine below the action. It may be less powerful than models today, but it was incredibly potent for the time.
Fast forward a bit to 1936. The country was in the Great Depression, but Winchester still produced excellent hunting rifles. Hunters called the Model 70 from Winchester the rifleman’s rifle, taking inspiration from Mauser, the German manufacturer. Winchester made the rifle with a controlled feed until 1964 before switching to a push feed and it still makes variations of the Model 70 today.
After World War II, Marlin introduced the 336 model as a successor to its 1893 rifle. It’s a lever-action rifle your grandfather may have owned to go deer hunting. Its specs may vary, but you’ll typically see it with a .30 or .35 caliber. The barrel can be as short as 20 inches or extend to 24 inches long. Marlin no longer makes the 336, but, Ruger — who purchased Marlin — plans to bring it back in 2023.
1962 saw what could be the best hunting rifle ever made — the Remington Model 700. This rifle is the most popular bolt-action firearm, with over five million sold since its inception. In the last 60 years, Remington has made numerous variations to keep up with modern demand. This model is famous for its pair of dual-opposed lugs and a recessed bolt face.
The Remington 700 became the hunting rifle of choice for many across America, leading to its adoption by the U.S. military and law enforcement. Remington also makes 700s for the police — the 700P. The manufacturer makes the M24 and M49 sniper rifles for the military based on the 700.
Rifles have come a long way since the beginning. Imagine picking up a Pennsylvania rifle and comparing it to your Mauser 18 Savanna. The hunting rifle helped settlers and early Americans hunt and sustain themselves and the evolution has led to the great rifles you know today, like the Remington 700.

The post How Has the Hunting Rifle Evolved Over the Last 300 Years? appeared first on AllOutdoor.com.
AllOutdoor.com
https://theawesomer.com/photos/2023/03/we_didnt_start_the_fire_leo_moracchioli_t.jpg
Wheel of Fortune, Sally Ride, heavy metal suicide. Leo Morachiolli didn’t start the fire, but he did an impressive job covering Billy Joel’s wordy 1989 hit, adding fuel to the inferno with his hard-edged guitar and gravelly vocals. If you’re waiting for Joel to update the song for the 21st century, don’t hold your breath.
The Awesomer
Laravel OpenWeather API (openweather-laravel-api) is a Laravel package to connect Open Weather Map APIs ( https://openweathermap.org/api ) and access free API services (current weather, weather forecast, weather history) easily.
Install the package through Composer.
On the command line:
composer require rakibdevs/openweather-laravel-api
If Laravel > 7, no need to add provider
Add the following to your providers array in config/app.php:
'providers' => [ // ... RakibDevs\Weather\WeatherServiceProvider::class, ], 'aliases' => [ //... 'Weather' => RakibDevs\Weather\Weather::class, ];
Add API key and desired language in .env
OPENWAETHER_API_KEY=
OPENWAETHER_API_LANG=en
Publish the required package configuration file using the artisan command:
$ php artisan vendor:publish
Edit the config/openweather.php file and modify the api_key value with your Open Weather Map api key.
return [ 'api_key' => env('OPENWAETHER_API_KEY', ''), 'onecall_api_version' => '2.5', 'historical_api_version' => '2.5', 'forecast_api_version' => '2.5', 'polution_api_version' => '2.5', 'geo_api_version' => '1.0', 'lang' => env('OPENWAETHER_API_LANG', 'en'), 'date_format' => 'm/d/Y', 'time_format' => 'h:i A', 'day_format' => 'l', 'temp_format' => 'c' // c for celcius, f for farenheit, k for kelvin ];
Now you can configure API version from config as One Call API is upgraded to version 3.0. Please set available api version in config.
Here you can see some example of just how simple this package is to use.
use RakibDevs\Weather\Weather; $wt = new Weather(); $info = $wt->getCurrentByCity('dhaka'); // Get current weather by city name
Access current weather data for any location on Earth including over 200,000 cities! OpenWeather collect and process weather data from different sources such as global and local weather models, satellites, radars and vast network of weather stations
// By city name $info = $wt->getCurrentByCity('dhaka'); // By city ID - download list of city id here http://bulk.openweathermap.org/sample/ $info = $wt->getCurrentByCity(1185241); // By Zip Code - string with country code $info = $wt->getCurrentByZip('94040,us'); // If no country code specified, us will be default // By coordinates : latitude and longitude $info = $wt->getCurrentByCord(23.7104, 90.4074);
{
"coord": {
"lon": 90.4074
"lat": 23.7104
}
"weather":[
0 => {
"id": 721
"main": "Haze"
"description": "haze"
"icon": "50d"
}
]
"base": "stations"
"main": {
"temp": 26
"feels_like": 25.42
"temp_min": 26
"temp_max": 26
"pressure": 1009
"humidity": 57
}
"visibility": 3500
"wind": {
"speed": 4.12
"deg": 280
}
"clouds": {
"all": 85
}
"dt": "01/09/2021 04:16 PM"
"sys": {
"type": 1
"id": 9145
"country": "BD"
"sunrise": "01/09/2021 06:42 AM"
"sunset": "01/09/2021 05:28 PM"
}
"timezone": 21600
"id": 1185241
"name": "Dhaka"
"cod": 200
}
Make just one API call and get all your essential weather data for a specific location with OpenWeather One Call API.
// By coordinates : latitude and longitude $info = $wt->getOneCallByCord(23.7104, 90.4074);
4 day forecast is available at any location or city. It includes weather forecast data with 3-hour step.
// By city name $info = $wt->get3HourlyByCity('dhaka'); // By city ID - download list of city id here http://bulk.openweathermap.org/sample/ $info = $wt->get3HourlyByCity(1185241); // By Zip Code - string with country code $info = $wt->get3HourlyByZip('94040,us'); // If no country code specified, us will be default // By coordinates : latitude and longitude $info = $wt->get3HourlyByCord(23.7104, 90.4074);
Get access to historical weather data for the previous 5 days.
// By coordinates : latitude, longitude and date $info = $wt->getHistoryByCord(23.7104, 90.4074, '2020-01-09');
Air Pollution API provides current, forecast and historical air pollution data for any coordinates on the globe
Besides basic Air Quality Index, the API returns data about polluting gases, such as Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), and particulates (PM2.5 and PM10).
Air pollution forecast is available for 5 days with hourly granularity. Historical data is accessible from 27th November 2020.
// By coordinates : latitude, longitude and date $info = $wt->getAirPollutionByCord(23.7104, 90.4074);
Geocoding API is a simple tool that we have developed to ease the search for locations while working with geographic names and coordinates.
-> Direct geocoding converts the specified name of a location or area into the exact geographical coordinates;
-> Reverse geocoding converts the geographical coordinates into the names of the nearby locations.
// By city name $info = $wt->getGeoByCity('dhaka'); // By coordinates : latitude, longitude and date $info = $wt->getGeoByCity(23.7104, 90.4074);
Laravel Open Weather API is licensed under The MIT License (MIT).
Laravel News Links
https://laravelnews.s3.amazonaws.com/images/laravel-valet-version-four.png
Valet 4 is officially released! Let’s look into what v4 offers and how you can upgrade your local install today.
Valet was originally introduced in May 2016 with this incredible video. Valet v2 was released soon after, bringing about the move from Caddy to Nginx. But after that, development on Valet slowed; as Taylor has often pointed out, “at that point, Valet was feature complete.”
However, when I picked up maintenance of Valet a few years back, there were two things I noticed: first, that many people needed different versions of PHP for their different sites; and second, that miscellaneous features and bug fixes addressed over the years made the codebase a bit difficult to reason with at times.
Valet v3 was released in March 2022, with the primary focus on adding support for multiple versions of PHP running in parallel on the same machine.
And now, we’re looking at Valet v4.
The most important change to Valet 4 is something you can’t even see from the outside: the internals of the project has been re-architected and tested heavily. Just to be clear, they’ve been re-architected back toward the style of simplicity Taylor and Adam’s original code had. But they’re now covered with all forms of unit and integration tests, and the changes made since Valet 2 are now much better integrated.
What does that mean?
Valet 4 is the most stable, easy to debug, and easy to fix version of Valet yet.
There are a few user-facing new features:
valet status command: If you run valet status, you’ll get a table showing you the “health” of a few important aspects of your Valet application. This is helpful both because you can use it when you’re debugging, but, like any good CLI tool, it’ll also return codes for success or failure that other CLI tools can consume.valet share-tool expose and, if you don’t have Expose installed, it’ll prompt you to install it. Once you’ve set up your Expose token, you’re ready to share using the same valet share command you’re familiar with.If you’re upgrading from Valet 3, here’s my preferred way to upgrade:
~/.composer/composer.json file and update your Valet requirement to "^4.0"
composer global update laravel/valet
valet install
Make sure you run valet install, as it’ll check your system’s compatibility and upgrade some configuration files for you.
If you have any custom drivers, you’ll want to update them to match the new syntax (basically, drivers are now namespaced and have type hints and return types).
.valetphprcIf you use .valetphprc to define your sites’ PHP versions, you’ll want to rename those files to .valetrc and change their contents; .valetphprc files just contain a PHP Brew formula (e.g. php@8.1), but the new .valetrc files are broader config files, so you’ll need to prefix the formula with php=.
So if your project had this .valetphprc file:
php@8.1
You’ll want to rename it to .valetrc and update its contents to this:
php=php@8.1
Valet 4 requires PHP 8.0+ to be installed on your system via Homebrew. As I mentioned already, you can use Valet’s isolation feature to set individual sites to use older versions of PHP, back to 7.1.
However, if you have a reason you need to use PHP 7.1-7.4 as your primary linked PHP (meaning if you just type php -v you see something between 7.1 and 8.0), you can do that! Just make sure that you have a modern version of PHP installed on your machine, and Valet will use that version to run its internal commands.
However, a quick warning: If you use Valet 4 and your primary linked version of PHP is lower than PHP 8, all of your local Valet CLI commands will run a bit more slowly, as they have to find your modern PHP install and proxy their calls through it.
That’s it! The primary goal of Valet 4 is stability, but it also opens up some great new options for the future. First, the .valetrc file is much more powerful than .valetphprc was, and we can make it a lot more configurable. And second, I dropped a concept called Extensions that was basically entirely unused, with the hope of building a plugin system sometime in the near future.
If you followed my journey of rebuilding Valet for v4 on Twitter, you might have seen that I attempted to make it work on Linux. Sadly, that wasn’t successful, but I still have dreams of one day attempting it again. No promises… but it’s still a dream!
I hope you all love Valet 4. Enjoy!
Laravel News
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMbtjUuceQaJ_JiqGW2aJ7bzET2TPRNs-7O888yvYKFxk8rgzPuhjVvS1eZPFQ7wU55UJIqYmKSoW2iC-CiucemUrlb_T_TTOMLPkEG-fOsKu9tO3hOlHeLWM8xvcFSVIgPSAfQSBchQTrmm6o7MCFkzT-90PlwsI9WVx_xL62ZqR9v5FAjclOFtsO/w400-h254/Elephant%20stew.png
Found on Gab (clickit to biggit):
I had to laugh at the instructions.
I’ve been present when an elephant that was destroying crops was shot near an African village. The villagers swarmed the carcass, armed with machetes, axes and other edged instruments, and proceeded to have a gigantic meat-eating binge that lasted three days. They dismembered that carcass from inside and out, literally: some people crawled inside the belly cavity and cut their way out, while others stood on the ribs and cut their way in. When an errant machete blade from one side or the other cut into someone on the other side of the skin, there were screams of outrage and anger; but mostly they were too busy eating (yes, even raw meat!) to care.
At the end of three days, all that was left were the remains of the entrails, and the huge bones of the elephant skeleton. Sixty-odd villagers had eaten until they bulged (literally): their stomachs were so distended I was surprised they could still move. Of course, in African heat, with no refrigeration available, the meat had already spoiled by the third day, but they ate and ate and ate so as to waste as little as possible of the precious nutrition deposited on their doorsteps by the Game Department.
Perhaps they should have tried this recipe . . .
Peter
Bayou Renaissance Man
https://theawesomer.com/photos/2022/03/molten_steel_coiling_t.jpg
Redditor arcedup works in a steel mill and wanted to test out the video capabilities of their phone. While they were at it, they captured this wonderfully satisfying clip of molten hot steel being turned into a coiled rod. Is it wrong that we want to make the world’s largest Slinky with it?
The Awesomer
B.L.U.F. An analysis/opinion of the State’s attempt to move certain arms out from the protection of the Second Amendment.
This is a long running argument from the anti-gun rights people. The gist is always of the “this modern thing didn’t exist in 1791 so it isn’t covered by the second amendment.” These same people are saying this on phones, computers, The Internet, which the firmly believe are covered under the first Amendment, even though those things would not have been known at the time of the founding.
The question is legitimate, so lets take it to an extreme.
Hagar reported to me that she often times has discussions with anti-gun people and they will ask something like “Well, do you think people should be able to own nuclear weapons!?!?!?”
She reports that most of them are shocked when she replies in the affirmative “Yes, they should be able to legally own nuclear weapons.” There is more to our discussion, I’ll get to that later.
The term was applied, then as now, to weapons that were not specifically designed for military use and were not employed in a military capacity. For instance, Cunningham’s legal dictionary gave as an example of usage: “Servants and labourers shall use bows and arrows on Sundays, & c. and not bear other arms.” See also, e.g., An Act for the trial of Negroes, 1797 Del. Laws ch. XLIII, § 6, in 1 First Laws of the State of Delaware 102, 104 (J. Cushing ed.1981 (pt. 1)); see generally State v. Duke, 42 Tex. 455, 458 (1874) (citing decisions of state courts construing “arms”). Although one founding-era thesaurus limited “arms” (as opposed to “weapons”) to “instruments of offence generally made use of in war,” even that source stated that all firearms constituted “arms.” 1 J. Trusler, The Distinction Between Words Esteemed Synonymous in the English Language 37 (3d ed. 1794) (emphasis added).
— District of Columbia v. Heller, 554 US 570 – Supreme Court 2008 P.2791
Here we have the short of it [w]eapons of offence, or armour of defence.
Id, citing Samuel Johnson’s dictionary of 1773
Are “nuclear weapons” weapons of offence? Yes, by the clear text of the Second Amendment supported by multiple sources at the time of the ratification of the Bill of Rights.
But nuclear weapons were not in existence at the time of the founding and the Founding Fathers could not have anticipated the horrific destructive power of such weapons. Again, Justice Scalia answers us.
Under the instructions given by the Supreme Court in Heller it is clear that nuclear weapons are arms.
But the argument goes on that the arm must be “bearable” to be considered covered under the Second Amendment. We know from historical fact that this was not the understanding at the time of the founding. We know this because many civilians owned cannon and even warships. In fact the US Government was known to issue sanctions to warship owners to have them engage in combat on the high seas with the enemies of the United States.
Justice Scalia addresses this issue. He is addressing the question in Heller in regards to individual right vs. collective right so his analysis is not a direct answer for us.
This leaves the question slightly open as to the question of size limitations on arms that are protected by the Second Amendment. We know that Heller clearly states that pistols and other handguns are. This has been extended to the sorts of long guns and shotguns that can be shouldered. It has been extended to weapons that are too heavy to shoulder but can be fired by one man from a bipod. I.e. a .50 cal semi-auto or bolt action rifle.
What about crew served weapons? Is a 60mm M224A1 mortar covered? How about the 81mm M252A1? How about the 120mm M120/M121, are they covered?
If those are covered are the M119 105mm Howitzer covered and the M777 155mm Howitzer? Or even the M110 Self-Propelled Howitzer. Those are huge. Are they covered?
The answer to all of that seems to be “yes”. The text of the Second Amendment does extend to “arms” that can not be carried by just one man but must instead have some other way of conveyance. It seems clear that a 16″ 3 Gun turret from a Wisconsin class Battleship would be covered arms.
From this, it seems clear that nuclear weapons are covered under the Second Amendment.
According to the Constitution the answer is shall not be infringed
According to the Supreme Court, there are acceptable regulations and limitations on the right to keep and bear arms.
…is neither a regulatory straightjacket nor a regulatory blank check…
which leads to the question of when it the analogical reasoning within the limits? That is not relevant here.
This allows the state to raise the question of what laws are consistent with Nation’s historical tradition of firearm(arms) regulation.
So far the state has not been able to produce any law, in my opinion, from the correct time period that supports the banning of a class of weapon.
What they have been able to do is to find multiple laws regarding fire safety in regards to gunpowder. I submit that since the possibilities of a radiation mishap does exist and that does not infringe on your ability to keep and bear the nuclear weapon, that the state could have storage requirements that are for safety purposes.
Note, when I say “safety purposes” that doesn’t mean stuff like “It must be kept disassembled with its fissionable materials in a different county.” It means things like radiation sensors that are tested and monitored. Containers that are designed to low radiation leakage to a reasonable level and so forth.
In my opinion this type of safety law would fall within the text, history and tradition requirements of both Heller and Bruen.
Currently, the Supreme Court has put another limitation on what arms are covered within the scope of the Second Amendment.
Chief Justice Waite ruled that neither the First nor Second Amendments limited the powers of the state government or individuals. Wikipedia
The right to keep and bear arms exists separately from the Constitution and is not solely based on the Second Amendment, which exists to prevent Congress from infringing the right.
Justia
[T]hose in common use for lawful purposes
Heller is the phrase that much of our current litigation is founded on. If an arm is in common use for lawful purposes then that arm is not “Unusual”.
This links back to …finds support in the historical tradition of prohibiting the carrying of dangerous and unusual weapons.
Id. at P. 2786 is the other part of this.
What this means is that nuclear weapons fail “in common use for lawful purposes” so they are unusual weapons and they are also “dangerous” which means that laws from the founding that prohibited carrying “dangerous and unusual” weapons can be used to justify carry regulations in regards to nuclear weapons today.
More to come.
Gun Free Zone
https://kbouzidi.com/img/containers/assets/terraform-your-laravel-deployments.jpeg/aede5dcfccc966770807a2c35c7ec2b5.jpeg
In this article we will use terraform to provision a lemp stack for a laravel application with all its configurations (database, php, nginx, firewall, ssl, etc).
Every PHP project you worked on has that phase when you need to deploy it to a desired environment that match the application requirement usually its a LEMP or a LAMP stack.
That may require you to install and configure all these applications on the server every time manually, which can be boring, time consuming and redundant.
Is a terraform project that i was working on to solve my PHP stack provisioning and configurations.
if you are dealing with that manually this will speed up your applications deployments. It can also help if you are migrating to a new server.
The good part is that you can also test it locally before deciding to run it on a production server.
I tried to make the project as user-friendly as possible, so you don’t need to know Terraform to use it.
However, I will still provide a step-by-step explanation:
In fact terraform installation is very simple, i will only cover ubuntu/debian installation for other OS, you can check the official documentation (=>).
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
You can use this terraform project against a fresh linux instance (vps) or a local virtual machine which is cool to test stuff before a real deployment.
For local testing i use vagrant & VirtualBox, you can use any other hypervisor.
This is my Vagrantfile :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.hostname = "kbouzidi"
config.vm.provision "shell", inline: <<-SHELL
apt update && hostname -I
SHELL
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
end
end
You need to copy your public ssh key to your target server.
ssh-copy-id user@targetIP
🚨 if you skip this probably you will be lost into a desert 🏜️
Well only if you will use vagrant with its own private key.
In this part, I will walk you through how I used this for a Laravel 10 project, and don’t worry, you don’t need to know Terraform at all.
First, you need to clone the project
git clone git@github.com:Safemood/terraform-php-stack.git
To start, you need to copy the example files to create your own configurations.
cd terraform-php-stack
cp terraform.tfvars.example terraform.tfvars
As you can see, this is the folder structure :
├── main.tf
├── modules
│ ├── install_dependencies
│ │ ├── configure.sh
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── install_node
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── install_mysql
│ │ ├── create_db.sh
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── install_nginx
│ │ ├── default.tftpl
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── install_php
│ │ ├── main.tf
│ │ ├── php.ini
│ │ ├── setup.sh
│ │ └── variables.tf
│ └── setup_app
│ ├── main.tf
│ ├── .env.tftpl
│ └── variables.tf
├── terraform.tfvars.example
What is important in here :
main.tf where we can set all the required modules.
modules folder where the supported modules exist.
terraform.tfvars where we can set our environment variables && configurations.
.env.tftpl the template .env file for your php project.
We will configure the whole deployment only from terraform.tfvars
ssh_host = "target ip"
ssh_user = "ssh user"
ssh_key = "private_key path"
php_version = "8.2"
webmaster_email = "example@test.com"
mysql_root_password = "crazySecurePassword"
git_repo = "git@github.com:laravel/laravel"
db_connexion = "mysql"
db_host = "localhost"
db_port = "3306"
db_name = "kbouzidi"
db_user = "safemood"
db_password = "terraform"
domain_name = "kbouzidi.com"
app_env = "production"
app_debug = false
scheme = "http" // 'https' will auto assign ssl certificates to your domain
stack_modules = ["dependencies", "node", "nginx", "php", "app", "mysql"] // dependencies","mysql", "nginx", "php","app" , "node"
system_dependencies = "git tmux vim zip unzip htop fail2ban"
installation_steps = [
# Set Folder Permissions
"sudo chgrp -R www-data storage bootstrap/cache",
"sudo chmod -R ug+rwx storage bootstrap/cache",
# Installation
"composer install --optimize-autoloader --no-dev",
"php artisan key:generate --force",
"php artisan storage:link --force",
"php artisan migrate --seed --force",
"sudo php artisan optimize:clear",
"npm install && npm run build",
"php artisan optimize"
]
What you need to know :
stack_modules is an array of the modules that you wanna install :
dependencies : to install required system dependencies and make other necessary configurations.
php : to install php on the system with the required version “php_version“.
node : to install nodejs & npm on the system with the required version “node_version“.
nginx : to install nginx and setup an nginx web server.
mysql : to install and setup a mysql server and a dadicated database to your project with the required permissions.
app : to setup and install our application.
Some other important notes:
scheme : https will auto assign ssl certificates to your domain using certbot.
git_repo : when its a private repo, you will need to add a deploy key to your project (link).
🚨 for private github repo make sure to use deploy keys so the token has access only to the related project only.
Deployment is the simplest part; just access the ‘terraform-php-stack’ folder and hit :
terraform init // only the first time
terraform apply
// or if you know what your doing 💥
terraform apply --auto-approve
You can see how the deployment process works in action.
As you have seen, the whole LEMP stack took only 4 minutes!
You can destroy this infrastructure with :
terraform destroy
I created this with Laravel ❤️ in mind and i really love to expand it to be helpful for all major PHP framework and stacks, so contributions are very welcome 🤗🥰.
Just keep in mind these main points :
The ability to use the project without being a terraform expert.
Simplify the process of deploying and managing infrastructure for PHP developers using Terraform.
Make PHP developers happier 😁.
What i have in mind for this project:
Add Symfony support .
Add a fully docker version to provision the whole stack with containers.
Add support for major cloud providers (aws, google cloud, azure) to make PHP stack provisioning easier on these platforms.
…
I hope the information I provided was helpful. If you have any questions or need further clarification, don’t hesitate to reach out to me. I’m always open to feedback, so please feel free to share any thoughts or suggestions you may have.
You can find me on LinkedIn || Twitter || Github!
Feel free to drop by and say hello – I’m always up for meeting new people and expanding my network!😊
Laravel News Links
A bit more philosophical and less practical video, on how I would upgrade an older project.Laravel News Links