feat/sg: prototype 'sg start sourcegraph-accounts'#63894
Conversation
| expected to be configured in '../sourcegraph-accounts' | ||
| install: | | ||
| createdb -h $PGHOST -p $PGPORT -U $PGUSER --encoding=UTF8 --template=template0 accounts || true | ||
| cd ../sourcegraph-accounts |
There was a problem hiding this comment.
can we be slightly more helpful here perhaps and do a if [ ! -d ../sgaccs ]; then echo "You need to clone that repo to <full path>"; fi ?
| cd ../sourcegraph-accounts | ||
| ./.bin/accounts-server | ||
| watch: | ||
| - ../sourcegraph-accounts/go.mod |
There was a problem hiding this comment.
oh wow haha I did not expect that would work
There was a problem hiding this comment.
Yeah, crossed my fingers and it just worked 😁
(though I think best practice wouldve dictated we check that each path is in cwd, but I'm not complaining 😆 )
| GOOGLE_CLIENT_SECRET: | ||
| project: sourcegraph-local-dev | ||
| name: SAMS_LOCAL_DEV_GOOGLE_CLIENT_SECRET |
| # use this port as the redirect URL, so we just stick to it for now. | ||
| PORT: 9991 | ||
| NOTIFICATION_GCP_PUBSUB_PROJECT: sourcegraph-local-dev # used by gcp-pubsub-emulator | ||
| NOTIFICATION_GCP_PUBSUB_TOPIC: notifications |
There was a problem hiding this comment.
should we then globally set PUBSUB_EMULATOR_HOST: 'localhost:8043' so sg services actually use the emulator?
There was a problem hiding this comment.
Ah, I just removed this, since I gave up on the emulator for now. Instead, the default dumps the would-be-published payloads to logs
Prototype what it might be like to have
sgrunsourcegraph-accounts. I think this would be a huge improvement over the multi-step, many-things-to-install process that currently exists for SAMS.There are a couple of quirks, but I think I'll leave this here for now, as this is part https://linear.app/sourcegraph/issue/CORE-220, a timeboxed spike into polishing some local-dev DX for SAMS.
Also see https://github.com/sourcegraph/sourcegraph-accounts/pull/262
Test plan
Go to 127.0.0.1:9991 and try to log in