Seed local db/docker with some client id and secre...
# support
s
Hi, I'm trying to run some tests in CI against the Medplum server docker container, and I'm running into issues where there is no project/client in the initial db, so the CI tests can't authenticate. Locally I just created the client/secret and set in my
.env
, and I thought that I could just set
MEDPLUM_CLIENT_ID
and
MEDPLUM_CLIENT_SECRET
to some arbitrary value in the Medplum server docker container, but this doesn't seem to be the case. Worst case, I can write some setup script to add values to the
Project
and
ClientApplication
tables when I create the Medplum db in the Postgres container, but this seems a bit messy. Is there some better way to do this?
I tried writing the sql script and seeding the db with some test project and client application, but when using the client id and secret to request a token from Medplum it returns "Invalid client"
n
s
Thank you! This is what I was looking for.
Funnily enough I kicked off an AI agent to try to research and solve this for me while I was eating lunch and it essentially came up with this exact solution.
t
Indeed it works correctly with the set up script ! we are using it and have no issue so far.
n
Not yet released but looks like a [PR got merged](https://github.com/medplum/medplum/pull/7739) that will make this easier by adding config for a
defaultSuperAdminClientId
and
defaultSuperAdminClientSecret
62 Views