Brewless Brewless Docs

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.

1. Connect Scaleway

In the console of your organisation, open Providers and connect Scaleway with an API key that is limited to one project. Connecting providers walks through it.

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:

brewless init

This detects the framework from your composer.json, creates the application at Brewless and writes brewless.yml:

brewless.yml
# 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.yml in the project, init offers to start from it and writes the brewless.yml that 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 and plain variables you add there 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.