mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 00:04:10 +00:00
docs: improve development getting started (#453)
This commit is contained in:
committed by
GitHub
parent
e42355b27c
commit
dfd57b4778
@@ -243,6 +243,8 @@ with hot-code reloading.
|
||||
|
||||
### Backend + Frontend
|
||||
|
||||
See the [./frontend/README_DEV.md](./frontend/README_DEV.md) file for all running options.
|
||||
|
||||
1. Create a Postgres Database for Windmill and create an admin role inside your
|
||||
Postgres setup.
|
||||
2. Install [nsjail](https://github.com/google/nsjail) and have it accessible in
|
||||
|
||||
@@ -9,6 +9,8 @@ services:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
# NOTE: if port 5432 are already in use locally, we'll also bind another port
|
||||
- 5433:5432
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: windmill
|
||||
|
||||
+41
-3
@@ -1,5 +1,7 @@
|
||||
# Developing
|
||||
|
||||
## Starting the Development Server
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or
|
||||
`pnpm install` or `yarn`), start a development server:
|
||||
|
||||
@@ -20,18 +22,54 @@ docker-compose up db server
|
||||
|
||||
### 2. Backend is run by cargo
|
||||
|
||||
In the backend folder:
|
||||
**Prerequisites**
|
||||
|
||||
- Install Rust [as explained on the website](https://www.rust-lang.org/tools/install).
|
||||
- Install llvm
|
||||
|
||||
**on OSX:**
|
||||
```bash
|
||||
brew install llvm caddy gsed
|
||||
|
||||
# make LLVM tools available on PATH
|
||||
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
|
||||
|
||||
# now, restart your shell. You should now have the `lld` binary on your PATH.
|
||||
```
|
||||
|
||||
**Do a Frontend Build**
|
||||
|
||||
In order to run the backend, you need to have a frontend build inside `frontend/build/`.
|
||||
|
||||
Otherwise, `cargo run` will break.
|
||||
|
||||
So, in the frontend folder, run:
|
||||
|
||||
```bash
|
||||
cargo run
|
||||
# !!! on OSX, you are not allowed to use the system SED, but you need to use GNU SED.
|
||||
# !!! thus, in `frontend/package.json`, replace all `sed` occurences with `gsed`.
|
||||
|
||||
# prerequisite for build
|
||||
npm run generate-backend-client
|
||||
|
||||
npm run build
|
||||
# now, you'll have a `frontend/build` folder.
|
||||
```
|
||||
|
||||
In the root folder
|
||||
In the root folder:
|
||||
|
||||
```bash
|
||||
docker-compose up db
|
||||
```
|
||||
|
||||
In the backend folder:
|
||||
|
||||
```bash
|
||||
DATABASE_URL=postgres://postgres:changeme@127.0.0.1:5433/windmill?sslmode=disable cargo run
|
||||
```
|
||||
|
||||
You can now access [http://127.0.0.1:8000](http://127.0.0.1:8000).
|
||||
|
||||
### In both cases
|
||||
|
||||
In the frontend folder:
|
||||
|
||||
Reference in New Issue
Block a user