brezel / brezel
description
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:PowerShell
Type:project
Requires
- brezel/api: ^0.61.1
Requires (Dev)
- barryvdh/laravel-ide-helper: ^2.6
- beyondcode/laravel-dump-server: ^1.0
- doctrine/dbal: ~2.9.2
- facade/ignition: ^2.0
- filp/whoops: ^2.0
- mockery/mockery: ^1.0
- nunomaduro/collision: ^5.0
- pestphp/pest: 0.3.*
- pestphp/pest-plugin-laravel: 0.3.*
- phpstan/phpstan: ^0.12.38
- phpunit/phpunit: ^9.0
README
Install or update the Brezel components
Install composer packages:
composer install
Install NPM packages:
npm install
Create the Database
Create a new MySQL database called brezel_meta_<some-name>
. This will be the meta database for one or more Brezel systems. In MySQL, execute the following command:
CREATE DATABASE brezel_meta_<some-name>
Configure your Brezel environment
Copy the .env.example
file to .env
and edit the .env
file.
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_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"
Setup your Brezel
Initialize the database:
php bakery init
Create one or more Brezel systems:
php bakery system create <system>
Run bin/u
to apply the current system config.
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
Set up your web server
macOS, Linux
If you used valet in the [webserver setup]({{< ref path="prerequisites.md" >}}):
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.
Windows
Go to the Brezel directory and run the following script on the Windows terminal:
bin\serve_on_windows.ps1
If you get CORS errors sure that you are running the script without nginx. You can run it with./bin/serve_on_windows.ps1 $true
to disable nginx.
Run the SPA service
In the Brezel directory, start the SPA development server:
npm run serve
The service will listen on localhost:8080 or the nearest open port.