-
Notifications
You must be signed in to change notification settings - Fork 200
Description
Feature Request
Motivation
When starting svix-server in local (for local dev, mostly) there's often a need to create a project and sometimes additional data (events) to start working. This can be automated with using svix-cli
either as a separate step, or even integrated into a docker-compose
job after the boot of the svix-server.
-
an additional step with
svix-cli
would mean changing the startup command fromdocker compose up --detach --wait
to bedocker compose up --detach --wait && ./seed-svix.sh
-
an additional step with docker-compose means more or less the same thing but as a docker service. note that if using
--wait
, the job would end and therefore the exit code would be != 0 (which can be deceptive)
Solution works but somehow doesn't feel clean, or at least as clean as others.
Proposal
Multiple possibilities:
-
do as stack-auth and propose a limited set of seed data built from env vars. that would mean extra coding and env var support in the seed script.
-
do as postgres/mongo/most-db: add a client in the server container and let users add an
init.d/
script. that would mean addingsvix-cli
in thesvix-server
image and good api support from the svix-cli.
The 2nd solution would also mean that healthcheck command could be added to the svix-cli
which looks like a better fit for this (rather than within svix-server
)