๐ Run for development
You have two options for running this software for development:
- Start the third party services in containers and run the dashboard and server through Bun locally
- Start everything in containers (may not work/not supported)
Base Setup
1. Requirements:
The following software is required:
- Git
- Bun (v1.2.1 or later)
- Docker or Podman
- Docker Compose (NOT Podman Compose since it doesnโt support the full Compose Spec!)
Note: If you are using Podman make sure Docker Compose is able to detect it.
2. Clone this repository and navigate into it
git clone https://gitlab.bht-berlin.de/skill-issue/b23/webedit.git
cd webedit
Locally
Make sure you have completed the Base Setup before continuing.
1. Start services
To start garage and valkey.
Make sure you donโt have any software that binds to any of the following ports running: 6379, 3900, 3903
With Docker
docker compose up -d
2. Install dependencies
bun install
To install dependencies with the exact Version specified in the bun.lock
file add --frozen-lockfile
.
3. Setup .env
files
Navigate to apps/dashboard
and copy the .env.example
into a new file .env.local
.
In the dashboards .env.local
file check that the Ports match the ones in the servers .env
file and adjust them accordingly if they donโt. Note: VITE_SERVER_PORT
refers to the ELYSIA_PORT
in the Servers .env
.
4. Start the development server
You can choose to start the server and dashboard in one command or in separate commands for example when you only want to run one or want to use separate terminals for them. Make sure you donโt have any software that binds to any of the following ports running: 2000, 3000, 3001
Dashboard and Server in one
bun run dev
Only Dashboard
bun run dashboardDev
Only Server
bun run serverDev
Product website
To start a development server to view our product website
bun run websiteDev
this may or may not work. If it doesnโt try to navigate into the website folder and start the dev script manually
cd apps/website && \bun run dev
5. Connect
Vite (dashboard) should now have started a development server on localhost and printed the Port (by default 2000
) into the console. Navigate to that location in your browser (http://localhost:2000).
If the port differs from 2000
, adjust the TRUSTED_ORIGINS
in the servers .env
file.
The serverโs REST API should be running at https://localhost:3000
.
Both the Server and Dashboard are hot reloading changes to the code.
Everything In Containers
Make sure you donโt have any software that binds to any of the following ports running: 3001, 3002
1. Start everything
docker compose -f compose.full-stack.yml up -d
2. Connect
Open your browser and enter https://localhost:3002
.
- The route
https://localhost:3002/api
is automatically forwarded to the backend server. - The route
https://localhost:3002/hocuspocus
is automatically forwarded to the hocuspocus server.
Open https://localhost:3001
in your browser for the product website.