Getting started
Before you begin
Make sure you have access rights to the Kibro package registries (currently, that is by being invited to the Brezel GitLab namespace) and that you fulfill the system requirements.
Then, complete the following steps to set up your Brezel instance:
API Composer registry configuration
This section ensures that you are able to retrieve the brezel/api
composer package.
First, generate a GitLab personal access token with the scope set to, at minimum, api
. Then, add your access token to your global composer config as follows:
Refer to the GitLab Guide for details.
SPA NPM registry configuration
This section ensures that you are able to retrieve the @kibro/brezel-spa
, @kibro/brezel-recipes
, @kibro/brezel-brotcast
, and other @kibro
npm packages.
First, make sure you are authenticated to the package registry. Try the instance-level endpoint, as described here.
Then, add the @kibro
registry:
The trailing slash is important, as package managers like pnpm
choke on it otherwise.
Installation
-
Fork Brezel/Brezel. If you cloned an existing Brezel instance, you can skip this step. Fork and clone the repo, then replace all
example
content with your system name. -
Go to the directory of your instance and install the necessary dependencies:
-
Create a new MySQL database called
brezel_meta
, or any other name you prefer. This will be the meta database for one or more Brezel systems in this instance. In MySQL, execute the following command:
Setup your Brezel
-
Copy the
.env.example
file to.env
and edit the.env
file. Make sure to setAPP_ENV
to the appropriate value (local
,staging
orproduction
). This determines if passwords are seeded assecret
or not, among other things. For a full list of settable environment variables, consult the environment variable reference. To get started, make sure to set the following variables: -
Initialize the database:
-
Create one or more Brezel systems by using the following command. Replace
example
with the name of your system. -
The corresponding directory
systems/example
can hold.bake
-configuration files that can be synced to theexample
database. To do this, you can run the following command: -
When creating the system for the first time, it is possible that the apply command has to be run two times to create the default admin user:
Start the servers
Windows
For Windows, we offer a simple script that starts a terminal window with all necessary servers running, including an interactive
powershell session in the directory to run things like php bakery apply
.
Look at the windows prerequisites for more details what you need to use this.
Now just go to the Brezel directory and run the following script in powershell:
This gives you a basic, running Brezel instance. For websocket or cron support extra steps are needed.
- For websockets clone brotcast into
C:\Code\Brezel
. This path might get configurable in the future, but for now, it’s not. Annoy Oli or implement it yourself as a param for the script.
macOS, Linux
API
If you used valet in the webserver setup:
Now valet created the symbolic link mybrezel.test
to your Brezel instance. This is where the Brezel API is reachable from now on.
SPA
In the Brezel directory, start the SPA development server:
The service will listen on localhost:8080 or the nearest open port.