Last active
November 6, 2023 16:30
-
-
Save samie/3d9e1d6274be5cbda7e25356a1efcad3 to your computer and use it in GitHub Desktop.
Steps to install Discourse in a VM using Multipass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Multipass on macOS | |
# Download and install: open https://multipass.run/download/macos | |
## Create Discourse VM and open shell | |
multipass launch --disk 8G --memory 4G --name discourse-server && multipass shell discourse-server | |
## Install NVM and Node 18 LTS | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash && source ~/.bashrc && nvm install v18.18.2 | |
## Install yarn | |
npm -g install yarn | |
## Run the Discourse install script: | |
cd ~ && bash <(wget -qO- https://raw.githubusercontent.com/discourse/install-rails/master/linux) | |
## Clone the discourse repo | |
cd ~ && git clone https://github.com/discourse/discourse.git ~/discourse | |
## Install everything | |
cd ~/discourse && source ~/.bashrc && bundle install && yarn install | |
## DB migrate | |
cd ~/discourse && bin/rails db:create && bin/rails db:migrate && RAILS_ENV=test bin/rails db:create db:migrate | |
## Run! | |
cd ~/discourse && bin/ember-cli -u |
You should perhaps not have the delete and purge command in the same script :)
Haha, true... I put that here instead:
## Delete and purge multipass instance when not needed anymore
multipass stop discourse-server && multipass delete discourse-server && multipass purge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is how to find the IP for the Discourse VM: