Getting started
Quickstart
From a Laravel project on your machine to a live release in your own Scaleway project.
On this page
This page takes a Laravel application to its first live release. You need a Scaleway account, an organisation at Brewless and the Brewless command line client.
0. Register your organisation
Register on brewless.eu/register with the email address of your organisation. Free mail such as Gmail or Outlook is not accepted. Choose a console address, such as acme, and click the link in the mail: your organisation is created, and you sign in to its console at acme.brewless.eu. The free plan covers one application with every environment. An organisation that stays empty, with no provider connected and no application, is closed 30 days after its last sign-in, after a mail to warn you.
The Applications page of the console lists the steps below as a checklist, ticked off as your organisation takes them: connecting Scaleway, creating an application, the first deploy and a domain of your own. Hide it with the cross when you no longer need it; that is remembered in your browser.
1. Connect Scaleway
In the console of your organisation, open Providers and connect Scaleway with the API key of an IAM application you make for Brewless. Connecting providers walks through it, and Check rights there shows which rights the key has.
2. Sign in from the command line
brewless login acme
acme is the name of your organisation, as in acme.brewless.eu. The client shows a code and a link. Approve it in the console and this machine is signed in. See Signing in.
3. Connect your project
In the root of your project, first add the package your containers run with:
composer require brewless/laravel
It gives your containers the routes Brewless releases and runs them with: the release commands such as migrate --force, the scheduler and the queue. There is nothing to register; it works with Laravel 12 and 13 on PHP 8.3 and up. Commit composer.json and composer.lock: a deploy builds what is committed.
Then connect the project:
brewless init
This detects the framework from your composer.json, creates the application at Brewless and writes brewless.yml. When your key may make projects, the application gets a Scaleway project of its own, and init waits for it and names it. When your organisation has connected more than one Scaleway project, it first asks which one the application runs with:
# Which application this is at Brewless. No secrets belong in this file.
organisation: acme
application: shop
framework: laravel
Commit this file. It holds no secrets.
4. Add and set up your environments
init goes on to ask which environments the application should have, production and staging unless you pick otherwise, in which region, and for each one which database, where its jobs wait and whether it gets a bucket for files. After one yes it makes that in your own accounts. See init.
If you said no, or add an environment in the console later, set it up with:
brewless provision production
If your containers exist already, adopt them on the Resources page instead. Both are described under Setting an environment up.
Tip
Coming from Laravel Vapor? With a
vapor.ymlin the project,initoffers to start from it and writes thebrewless.ymlthat says the same. See Moving from Laravel Vapor.
5. Push your variables
Put the variables of the environment in .env.production and push them to your own Secret Manager. You can also paste them under Variables in the console, with Show values:
brewless env:push production
If setting up the environment named variables for you to add, such as DB_USERNAME and DB_PASSWORD, put them in this file too: a deploy is refused until they are there.
Warning
Do not commit
.env.production. Its values belong in your Secret Manager and nowhere else; Brewless passes them on without keeping them.
6. Deploy
brewless deploy production
Only what is committed is deployed. The client prints each step as it finishes and ends with the address of the environment. Deployments explains what happens in between.
The deploy sends your brewless.yml along. Sizes, scale, queues, release commands, plain variables and how long the edge keeps a page (edge.cache) are applied with the next deploy; see brewless.yml.
Next steps
- Put your own domain on the environment.
- Set how far the environment may scale.
- Invite your team.
