-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add mprocs as an alternative to bin/start #26624
Conversation
6675b5a
to
d4b2b5d
Compare
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
d4b2b5d
to
28c4c72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fancy! Seems to work well:
In fact, a common use case for me is to stop the backend server from running so I can run it inside of Cursor with the debugger:
diff --git a/bin/start b/bin/start
index 171656ed0e..239f7ffd82 100755
--- a/bin/start
+++ b/bin/start
@@ -19,7 +19,7 @@ curl -s 'http://localhost:8123/ping' || ( service_warning 'ClickHouse'; bin/chec
[ ! -f ./share/GeoLite2-City.mmdb ] && ( curl -L "https://mmdbcdn.posthog.net/" --http1.1 | brotli --decompress --output=./share/GeoLite2-City.mmdb )
./bin/start-worker &
-./bin/start-backend &
+# ./bin/start-backend &
./bin/start-frontend &
./bin/temporal-django-worker &
Looks like I can easily stop the process in mproc
instead 😁
It'd be worth documenting this in https://posthog.com/handbook/engineering/developing-locally |
thanks for the reminder! i'll open a PR for that as well |
Problem
Separate dev processes. Make it easy to see logs separately and restart stuff separately.
mprocs is a nice tool for this. You can install it with
brew install mprocs
With these changes, you can run
./bin/start-mprocs
and get thisChanges
Add mprocs.yaml and a wrapper script to run mprocs with default env vars.
Just added stuff, nothing existing has been changed.