File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
169167systemctl --user start vibora-dev
170168```
171169
@@ -192,11 +190,12 @@ journalctl --user -u vibora-dev -f
192190
193191When 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
1961942 . ** Fails safely** : If the build fails, the server continues running and an error is shown
1971953 . ** 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
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ Type=simple
77WorkingDirectory =%h/projects/vibora
88Environment =VIBORA_DEVELOPER =1
99Environment =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'
1212ExecStartPre =/bin/bash -c 'cd %h/projects/vibora && bun run drizzle-kit push'
1313ExecStart =/bin/bash -c 'cd %h/projects/vibora && bun server/index.ts'
1414Restart =on-failure
You can’t perform that action at this time.
0 commit comments