Discourse: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "frameless|Discourse Discourse is a communication platform "for the next 10 years". It features a clean web interface, mailing list features and mu...")
 
(Add development setup docs)
Line 10: Line 10:
* [https://discourse.mozilla-advocacy.org/ Mozilla Advocacy Community]
* [https://discourse.mozilla-advocacy.org/ Mozilla Advocacy Community]
* [https://forum.learning.mozilla.org/ Mozilla Learning Forum]
* [https://forum.learning.mozilla.org/ Mozilla Learning Forum]
= Documentation =
== Development ==
=== Setting up the development environment ===
The quickest and easiest way to get up and running with hacking on Discourse is using Vagrant, the following steps will download, provision and setup a development virtual machine for you.
Ensure you have Git, VirtualBox and Vagrant installed.
Open a terminal, and clone the Discourse repository with:
<pre>
git clone https://github.com/discourse/discourse.git
</pre>
Then enter the project directory:
<pre>
cd discourse
</pre>
To start downloading, provisioning and booting the VM, run:
<pre>
vagrant up
</pre>
This will take quite a while, so go grab a hot chocolate.
Once the VM has booted up, you can shell into it with:
<pre>
vagrant ssh
</pre>
Then enter the project directory, within the VM:
<pre>
cd /vagrant
</pre>
Install the required gems:
<pre>
bundle install
</pre>
Run the database migrations:
<pre>
bundle exec rake db:migrate
</pre>
Create an admin user:
<pre>
bundle exec rake admin:create
</pre>
And start the rails server:
<pre>
bundle exec rails s -b 0.0.0.0
</pre>
After a few seconds rails will start serving pages, and you should be able to access your Discourse instance at: http://localhost:4000
To log in as the admin user, navigate to:
<pre>
http://localhost:4000/session/<username>/become
</pre>
(replacing <code><username></code> with the admin username)

Revision as of 17:46, 31 October 2016

Discourse

Discourse is a communication platform "for the next 10 years". It features a clean web interface, mailing list features and much more.

This page contains all the important details about and for the use, setup and development of Discourse within Mozilla.

Current instances

Documentation

Development

Setting up the development environment

The quickest and easiest way to get up and running with hacking on Discourse is using Vagrant, the following steps will download, provision and setup a development virtual machine for you.

Ensure you have Git, VirtualBox and Vagrant installed.

Open a terminal, and clone the Discourse repository with:

git clone https://github.com/discourse/discourse.git

Then enter the project directory:

cd discourse

To start downloading, provisioning and booting the VM, run:

vagrant up

This will take quite a while, so go grab a hot chocolate.

Once the VM has booted up, you can shell into it with:

vagrant ssh

Then enter the project directory, within the VM:

cd /vagrant

Install the required gems:

bundle install

Run the database migrations:

bundle exec rake db:migrate

Create an admin user:

bundle exec rake admin:create

And start the rails server:

bundle exec rails s -b 0.0.0.0

After a few seconds rails will start serving pages, and you should be able to access your Discourse instance at: http://localhost:4000

To log in as the admin user, navigate to:

http://localhost:4000/session/<username>/become

(replacing <username> with the admin username)