Skip to content

Instantly share code, notes, and snippets.

@xfalcox
Last active October 9, 2025 13:52
Show Gist options
  • Select an option

  • Save xfalcox/a1c151a48dcd78a18cfac31dbe94a341 to your computer and use it in GitHub Desktop.

Select an option

Save xfalcox/a1c151a48dcd78a18cfac31dbe94a341 to your computer and use it in GitHub Desktop.
Discourse Jules Environment
set -eux
cargo install oxipng
sudo apt update
sudo apt install -y build-essential redis-server postgresql-common curl libffi-dev libz-dev libtool libyaml-dev
sudo apt -y -q install imagemagick pngcrush pngquant ripgrep jhead jpegoptim
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
sudo apt install -y postgresql postgresql-18-pgvector postgresql-contrib libpq-dev
sudo systemctl start redis-server
sudo systemctl start postgresql
sudo -u postgres createuser -s -i -d -r -l -w $USER
sudo -u postgres createuser -s -i -d -r -l -w jules
psql -d postgres -c "SELECT version();"
export PATH="/mise/shims:/home/swebot/.local/bin:/root/.cargo/bin:$PATH"
curl https://mise.run | bash
mise --help
eval "$(mise activate bash)"
echo "eval $(/home/swebot/.local/bin/mise activate bash)" >> ~/.bashrc
mise use --global ruby
mise use --global node
eval $(mise env)
# bash
sudo npm install -g pnpm@9
node -v
pnpm -v
ruby -v
redis-cli INFO
psql -d postgres -c "SELECT version();"
cd /app
git pull
bundle
pnpm install
bin/rails db:create db:migrate
LOAD_PLUGINS=1 RAILS_ENV=test bin/rails db:create db:migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment