sndev
After our recent hiring trial (which I plan to write something about soon), a few years of having folks struggle getting setup contributing to SN's open source project, and asking what stackers' preferred local dev setups are, we developed
sndev
which allows you to run a fully featured SN developer environment locally in a single command.Special thanks to @elvismercury for his expert, careful, repeated nudges of "I'm really curious how easy getting started on something like SN can be." Of course, never ending thanks to all of SN's open source contributors too.
The single command:
./sndev start
The sndev environment provides all the services we run in production but locally for development, spinning up an auto-mining auto-channel-forming lightning regtest network (you don't need polar anymore), database, search engine, image proxy, and mock s3, and populates the database and search engine with a big production-shaped 45-day seed.
sndev
allows SN open source contributors to do things like login to local accounts with a single command:./sndev login <some nym>
Fund their account paying a bolt11 regtest invoice:
./sndev fund <bolt11>
And much more as seen by issuing
./sndev help
888 888 888 .d8888b 88888b. .d88888 .d88b. 888 888 88K 888 '88b d88' 888 d8P Y8b 888 888 'Y8888b. 888 888 888 888 88888888 Y88 88P X88 888 888 Y88b 888 Y8b. Y8bd8P 88888P' 888 888 'Y88888 'Y8888 Y88P manages a docker based stacker news development environment USAGE $ sndev [COMMAND] $ sndev help [COMMAND] COMMANDS help show help env: start start env stop stop env restart restart env status status of env delete delete env sn: login login as a nym lnd: fund pay a bolt11 for funding withdraw create a bolt11 for withdrawal db: psql open psql on db prisma run prisma commands dev: pr fetch and checkout a pr lint run linters other: compose docker compose passthrough sn_lncli lncli passthrough on sn_lnd stacker_lncli lncli passthrough on stacker_lnd
We'll be regularly refining and adding things to
sndev
. It's good enough I'll be using it exclusively for development myself now and @ek said he probably will too.contribution awards
Contribution awards are live. I published the draft of these earlier this week, which haven't been changed, and they are now found in SN's Github README. The reward structure is definitely experimental still, and will require a lot of adjustment, but it's ready to begin running I think.
We also rewrote our README so that it mostly appears as a single page and elaborates on things more.
We're hoping these help stackers continue to make SN more of what they want it to be, begin FOSSing, and stack sats.
sndev
for a test drive now!./sndev start
. I have a pretty dated dev machine and it has just absolutely ground to a near-halt when trying to run all these services.imgproxy
s3
opensearch
os-dashboard
sn_lnd
stacker_lnd
channdler
docker-compose.yml
. Probably not a high priority though, I imagine most developers are working on a more powerful machine.sndev start app
(which isn't documented very well) but it will also start all thedepends_on
which might be over-specified..env.sample
and restart it. I made it copy/merge into.env.development
(untracked) based on your feedback..env.development
and still keep it up to date if upstream changes.