Skip to content

Commit ea05f6f

Browse files
Merge branch 'vibora-development-i201'
2 parents f75e33e + 70e42fa commit ea05f6f

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

DEVELOPMENT.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@ systemctl --user enable vibora-dev
161161

162162
### First Start
163163

164-
Before starting the service for the first time, build Vibora:
164+
The service automatically builds Vibora on start, so just run:
165165

166166
```bash
167-
cd ~/projects/vibora
168-
mise run build
169167
systemctl --user start vibora-dev
170168
```
171169

@@ -192,11 +190,12 @@ journalctl --user -u vibora-dev -f
192190

193191
When running in developer mode, the Settings page shows a "Restart Vibora" button. Clicking it:
194192

195-
1. **Builds first**: Runs `mise run build` in `~/projects/vibora`
193+
1. **Pre-flight build**: Runs `mise run build` to verify the code compiles
196194
2. **Fails safely**: If the build fails, the server continues running and an error is shown
197195
3. **Restarts on success**: If the build succeeds, triggers `systemctl --user restart vibora-dev`
196+
4. **Service rebuilds**: The systemd service runs the build again on start (this is fast since nothing changed)
198197

199-
This ensures you never accidentally take down the server with a broken build.
198+
This two-phase approach ensures you never accidentally take down the server with a broken build.
200199

201200
### Restarting from the CLI
202201

vibora-dev.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Type=simple
77
WorkingDirectory=%h/projects/vibora
88
Environment=VIBORA_DEVELOPER=1
99
Environment=NODE_ENV=production
10-
# Note: Build is handled by the /api/config/restart endpoint before triggering restart
11-
# This ensures we only restart if build succeeds
10+
Environment=PATH=%h/.local/bin:%h/.local/share/mise/shims:/usr/local/bin:/usr/bin:/bin
11+
ExecStartPre=/bin/bash -c 'cd %h/projects/vibora && mise run build'
1212
ExecStartPre=/bin/bash -c 'cd %h/projects/vibora && bun run drizzle-kit push'
1313
ExecStart=/bin/bash -c 'cd %h/projects/vibora && bun server/index.ts'
1414
Restart=on-failure

0 commit comments

Comments
 (0)