I can't find the correct env var to set to tell the lhci server to use postgres for storage. Tried :
Did I miss something ? Thanks for your help
Hi @Djiit I haven't use that option yet but based on the cli args it looks like you need to set them when you run the command:
lhci server --storage.sqlDialect=postgres --storage.sqlConnectionUrl="postgres://user@localhost/lighthouse_ci_db"
or in the lighthouserc.json file.
https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/cli.md#server
Hey, thanks for your answer. I was looking to a env-var only solution to
use the already available image from the docker hub : I need to provide the
pgsql db url at runtime (when the container start, I tell it where its db
is).
I guess I'll go with my own image if I have to.
Thanks again anyway, I appreciate your help !
--
Julien
Le ven. 29 nov. 2019 Ã 20:33, Johnny Zabala notifications@github.com a
écrit :
Hi @Djiit https://github.com/Djiit I haven't use that option yet but
based on the cli args it looks like you need to set them when you run the
command:lhci server --storage.sqlDialect=postgres
--storage.sqlConnectionUrl="postgres://user@localhost/lighthouse_ci_db"or in the lighthouserc.json.
https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/cli.md#server
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleChrome/lighthouse-ci/issues/121?email_source=notifications&email_token=AAI5TNFPZ7UOBKMJ5O7MK2DQWFVBDA5CNFSM4JTAKVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPO4DY#issuecomment-559869455,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI5TNEEDFD55W7M3GDCWQDQWFVBDANCNFSM4JTAKVCQ
.
Hey, thanks for your answer. I was looking to a env-var only solution to use the already available image from the docker hub : I need to provide the pgsql db url at runtime (when the container start, I tell it where its db is). I guess I'll go with my own image if I have to. Thanks again anyway, I appreciate your help !
Ok, I get it. Sorry that my answer didn't solve your issue. Well if you end up creating your own image please share in case it can help someone else 🙂.
Good luck.
There's a 1:1 mapping from env vars to CLI flags that follows yargs.
So LHCI_PROPERTY_NAME__SUBPROPERTY_NAME is equivalent to --propertyName.subpropertyName.
In this case...
export LHCI_STORAGE__SQL_DIALECT="postgres"
export LHCI_STORAGE__SQL_CONNECTION_URL="postgres://user@localhost/lighthouse_ci_db"
should work
It does work !
Thanks!
Just pushed this to add your usefull comment in the docs : https://github.com/GoogleChrome/lighthouse-ci/pull/123
Most helpful comment
There's a 1:1 mapping from env vars to CLI flags that follows yargs.
So
LHCI_PROPERTY_NAME__SUBPROPERTY_NAMEis equivalent to--propertyName.subpropertyName.In this case...
should work