-
Notifications
You must be signed in to change notification settings - Fork 135
Description
I apologize if I am being obtuse - but is there a preferred way of using this in a monorepo context? Help greatly appreciated.
My server is Daphne and my executable is in a directory called api. I understand I need to prefix the server start command with the pgbouncer command.
Starting point.
web: sh -c 'cd api && python3 manage.py collectstatic --noinput && daphne myapp.asgi:application --port $PORT --bind 0.0.0.0'
I can't call manage.py from the top level or it blows up. I also can't call ../bin/start-pgbouncer from within api because that script calls other scripts via relative path (and assumes they will exist at the top level).
I haven't delved into why the bin/start-pgbouncer executatble needs to be pre-prepended to the start server command but I assume I can't just slap it onto the end like,
web: sh -c 'cd api && python3 manage.py collectstatic --noinput && daphne myapp.asgi:application --port $PORT --bind 0.0.0.0' && bin/start-pgbouncer