Installation
3 minute read
Note
If you are a Brezel developer, use the Contribution setup!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 have completed the registry setup .
1. Fork Brezel/Brezel
Note
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.
2. Install or update the Brezel components
Go to the directory of your instance and install composer packages:
composer install
Install NPM packages:
npm install
3. Configure your Brezel environment
Copy the .env.example
file to .env
and edit the .env
file.
Make sure to set APP_ENV
to the appropriate value (local
, staging
or production
).
This determines if passwords are seeded as secret
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:
General settings
APP_URL="http://mybrezel.test"
SPA settings
Note: variables that are prefixed with VITE_
are baked into client JS scripts.
Do not put sensitive values here.
APP_API_URL="http://mybrezel.test"
APP_SYSTEM=example
Database settings
TENANCY_HOST=127.0.0.1
TENANCY_PORT=3306
TENANCY_DATABASE="brezel_meta"
TENANCY_USERNAME="<user>"
TENANCY_PASSWORD="<password>"
Brezel settings
BREZEL_EXPORT_URL="https://export.staging.cluster-sw.brezel.io"
4. Create the Database
Create a new MySQL database called brezel_meta
(or whatever you used for TENANCY_DATABASE
in your .env).
This will be the meta database for one or more Brezel systems in this instance.
In MySQL, execute the following command:
CREATE DATABASE brezel_meta
5. Setup your Brezel
Initialize the database:
php bakery init
Create one or more Brezel systems by using the following command.
Replace example
with the name of your system.
php bakery system create example`
The corresponding directory systems/example
can hold .bake
-configuration files that can be synced to the example
database. To do this, you can run the following command:
php bakery apply
To just see what Brezel plans to change, do:
php bakery plan
6. Start the servers
All-in-one
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:
bin\serve_on_windows.ps1
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.
Separate
Api
macOS, Linux
If you used valet in the webserver setup :
valet link
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:
npm run serve
The service will listen on localhost:8080 or the nearest open port.