search
HomePHP FrameworkLaravelwhat is laravel forge

what is laravel forge

Jun 27, 2022 pm 07:37 PM
laravel

laravel forge is a tool that makes PHP deployment a breeze, it allows users to use Git and some popular server providers to launch cloud servers and handle the deployment process. Laravel Forge has a lot of features and an easy-to-use UI that allows users to easily create and configure servers and deploy applications; after configuring the service provider, there is a high possibility that users can manage the server again without accessing the AWS console.

what is laravel forge

The operating environment of this tutorial: Windows 7 system, Laravel 9 version, DELL G3 computer.

What is laravel forge

Laravel Forge is a tool that makes PHP deployment a breeze. It has tons of features and an easy-to-use UI that allows you to easily create and configure servers and deploy applications. After configuring the service provider, there is a good chance that you will be able to manage the server again without accessing the AWS console.

Laravel Forge allows you to use Git and some popular server providers to launch cloud servers and handle the deployment process. The process is explained below:

First, you need to connect AWS or any other cloud provider to your Forge account. Next, link your source control (such as GitHub) to Forge. You can now create the server. Install the source control repository on the server. Finally, press the deploy button. Easy enough?

Server configured with Laravel Forge comes with the following stack:

  • Ubuntu 16.06

  • Nginx

  • PHP 7.2/7.1/7.0/5.6

  • MySQL/MariaDB/Postgres

  • Redis

  • Memcached

After creating the server, you can configure it further.

When you sign up, you can choose from the different plans they offer. I chose the $12/month Basic plan; however, you get a free trial with access to everything on the list for five days.

After logging in, you will see the following content.

what is laravel forge

You can choose Digital Ocean, AWS, Linode and Vultr for service providers. Alternatively, you can use Forge and a custom VPC. As for source code control, Forge supports GitHub, GitLab, and Bitbucket. In this tutorial, I will discuss the basics of configuring AWS to use Forge and GitHub for source code management. Once completed, you will be able to create and configure any number of servers.

If you are using another service provider on the list, you can skip this step and contact us later after we configure AWS and Laravel Forge.

Setting up Laravel Forge and AWS

To set up Forge and AWS, you need to perform the following steps.

1. Log in to Laravel Forge

Log in to Laravel Forge and select AWS as the service provider. You will be asked to enter the Key ID (Key) and Key Access Key (Key). You need to create a specific IAM user with a policy that provides sufficient access to Laravel Forge. IAM is Amazon's way of mapping permissions for each user, so if any issues arise, you can revoke access.

2. Create a new IAM user

Log in to the AWS Console and create a new IAM user.

what is laravel forge

# Give the user a meaningful name and check the Programmatic Access box.

3. Select the correct policy

Set the correct permissions for the laravel-forge IAM user. Create a new user group as user groups are ideal for managing permissions. Now the natural question is, "What policies should the fake user have access to?" While you could use AdministratorAccess to provide it, you shouldn't.

what is laravel forge

If you need Forge to create and configure servers on your behalf, you need to add two policies:

  • AmazonEC2FullAccess

  • AmazonVPCFulAccess

4. Save the credentials and confirm

Confirm the IAM account, on the next page you will Find the access key and password.

what is laravel forge

Go to the Laravel Forge page and paste it there. That’s all.

5. Link your GitHub account to Forge

If you haven’t done so already, connect your GitHub/Bitbucket account to Forge. Forge will add the public key to your account when you create the server. If you need to add new service providers and/or update source control, you can add these options in your profile.

Deploy now and deploy quickly

To deploy, you can deploy manually using the "Deploy Now" button. Alternatively, you can enable the Quick Deployment option, which automatically deploys your project when you push your code to the master branch of your chosen GitHub repository.

Deployment script

The default deployment script pulls the code from the repository, installs dependencies, starts the server, and deploys the application every time when running the migration. This is the actual deployment script.

cd /home/forge/redmonark.com
git pull origin laravelapi
composer install --no-interaction --prefer-dist --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
 
if [ -f artisan ]
then
    php artisan migrate --force
fi

If you need to tweak it and add extra stuff, you can.

[Related recommendations: laravel video tutorial]

The above is the detailed content of what is laravel forge. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Illusion of Inclusion: Addressing Isolation and Loneliness in Remote WorkThe Illusion of Inclusion: Addressing Isolation and Loneliness in Remote WorkApr 25, 2025 am 12:28 AM

Tocombatisolationandlonelinessinremotework,companiesshouldimplementregular,meaningfulinteractions,provideequalgrowthopportunities,andusetechnologyeffectively.1)Fostergenuineconnectionsthroughvirtualcoffeebreaksandpersonalsharing.2)Ensureremoteworkers

Laravel for Full-Stack Development: A Comprehensive GuideLaravel for Full-Stack Development: A Comprehensive GuideApr 25, 2025 am 12:27 AM

Laravelispopularforfull-stackdevelopmentbecauseitoffersaseamlessblendofbackendpowerandfrontendflexibility.1)Itsbackendcapabilities,likeEloquentORM,simplifydatabaseinteractions.2)TheBladetemplatingengineallowsforclean,dynamicHTMLtemplates.3)LaravelMix

Video Conferencing Showdown: Choosing the Right Platform for Remote MeetingsVideo Conferencing Showdown: Choosing the Right Platform for Remote MeetingsApr 25, 2025 am 12:26 AM

Key factors in choosing a video conferencing platform include user interface, security, and functionality. 1) The user interface should be intuitive, such as Zoom. 2) Security needs to be paid attention to, and Microsoft Teams provides end-to-end encryption. 3) Functions need to match requirements, GoogleMeet is suitable for short meetings, and CiscoWebex provides advanced collaboration tools.

What database versions are compatible with the latest Laravel?What database versions are compatible with the latest Laravel?Apr 25, 2025 am 12:25 AM

The latest version of Laravel10 is compatible with MySQL 5.7 and above, PostgreSQL 9.6 and above, SQLite 3.8.8 and above, SQLServer 2017 and above. These versions are chosen because they support Laravel's ORM features, such as the JSON data type of MySQL5.7, which improves query and storage efficiency.

The Benefits of Using Laravel as a Full-Stack FrameworkThe Benefits of Using Laravel as a Full-Stack FrameworkApr 25, 2025 am 12:24 AM

Laravelisanexcellentchoiceforfull-stackdevelopmentduetoitsrobustfeaturesandeaseofuse.1)ItsimplifiescomplextaskswithitsmodernPHPsyntaxandtoolslikeBladeforfront-endandEloquentORMforback-end.2)Laravel'secosystem,includingLaravelMixandArtisan,enhancespro

What is the latest version of Laravel?What is the latest version of Laravel?Apr 24, 2025 pm 05:17 PM

Laravel10,releasedonFebruary7,2023,isthelatestversion.Itfeatures:1)Improvederrorhandlingwithanewreportmethodintheexceptionhandler,2)EnhancedsupportforPHP8.1featureslikeenums,and3)AnewLaravel\Promptspackageforinteractivecommand-lineprompts.

How does the newest Laravel version simplify development?How does the newest Laravel version simplify development?Apr 24, 2025 pm 05:01 PM

ThelatestLaravelversionenhancesdevelopmentwith:1)Simplifiedroutingusingimplicitmodelbinding,2)EnhancedEloquentcapabilitieswithnewquerymethods,and3)ImprovedsupportformodernPHPfeatureslikenamedarguments,makingcodingmoreefficientandenjoyable.

Where can I find the release notes for the latest Laravel version?Where can I find the release notes for the latest Laravel version?Apr 24, 2025 pm 04:53 PM

You can find the release notes for the latest Laravel version at laravel.com/docs. 1) Release Notes provide detailed information on new features, bug fixes and improvements. 2) They contain examples and explanations to help understand the application of new features. 3) Pay attention to the potential complexity and backward compatibility issues of new features. 4) Regular review of release notes can keep it updated and inspire innovation.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor