Is there some secret repo that they all use to keep stuff up to date?
asdf is a huge help! I think I have seen it before but wanted to avoid Yet Another Package Manager. If it’s good enough for you, I’m all in.
And it looks like nodejs is out of date in the install script as well. A recent install has v18.12.1 and the script installs 16.
So it looks like
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf plugin add imagemagick
asdf install imagemagick 7.1.0-55
asdf plugin add nodejs
asdf install nodejs 18.12.1
Assuming that you get this in your .bashrc (or similar) somehow:
And installing these gems:
Some of those I might have added for some reason other than Discourse, though I’m not quite sure.
apt-get install -y git build-essential libxslt1-dev libcurl4-openssl-dev libksba8 \
libksba-dev libreadline-dev libssl-dev zlib1g-dev libsnappy-dev \
sqlite3 libsqlite3-dev postgresql postgresql-server-dev-all \
postgresql-contrib libpq-dev redis-server golang-go
go get github.com/mailhog/MailHog
(Probably not in that order) Comes pretty close. The current redis included with ubuntu is Good Enough for 99% of developers ~~(it’s 7.0.7 and not 6.x)~~Oh! 7.0.7 is now what’s included. But there is an
asdf plugin for redis as well.
Such a script would then be pretty easy to maintain in core when there was a version bump in node, imagemagick, or Ruby, and then a lazy developer could run that script once a week or with every new pull and have a current development environment. With an hour or three someone clever could make it cross-platform enough for Linux, Mac/homebrew, and Windows/WSL in a couple of hours. I thankfully don’t have easy access to Windows these days, so I’m not volunteering.
But I think if I watch changes to
discourse_docker maybe I’ll notice when those get updated and my hacked together additions to my
newmachine ansible playbook may now do the job.
Thanks for the tip! I think I can now have a dev setup on any machine with a single command.