docs: installing nodebb on the cloud

v1.18.x
psychobunny 11 years ago
parent df6fdf6f09
commit cc106d1251

@ -1,11 +1,21 @@
Installing NodeBB on the Cloud
==============================
The following are step-by-step guides to help you get up and running on the cloud using popular PaaS solutions.
testing
.. note::
If the PaaS solution of your choice is not listed here, please feel free to request a guide on our `community <https://community.nodebb.org>`_ or even better yet, submit one here.
testing
-------
testing
.. toctree::
:hidden:
:maxdepth: 0
Heroku <heroku>
Cloud9 <cloud9>
* :doc:`Heroku <heroku>`
* :doc:`Cloud9 <cloud9>`
* `Digital Ocean <http://burnaftercompiling.com/nodebb/setting-up-a-nodebb-forum-for-dummies/>`_ (external)

@ -0,0 +1,45 @@
Installation instructions for the Cloud 9 web based IDE.
**Step 1:** Clone NodeBB into a new workspace from GitHub. You can use the following command from the terminal:
`git clone git://github.com/designcreateplay/NodeBB.git nodebb`
The nodebb command after the git url will create a file called nodebb so you have to CD into the file after you have cloned NodeBB.
**Step 2:** Install redis with Cloud9's package manager
`nada-nix install redis`
**Step 3:** Run your redis server on port 16379 - port 6379 tends to be already used on Cloud 9. The "&" makes the command run in the background. You can always terminate the process later. $IP is a Cloud 9 system variable containing the global ip of your server instance.
<br />`redis-server --port 16379 --bind $IP &`
**Step 4:** Find out your instance's ip address so NodeBB can bind to it correctly. This is one of Cloud 9's demands and seems to be the only way it will work. You can't use $IP in your config.json either (which means you can't enter $IP in the node app --setup).
<br />`echo $IP`
**Step 5:** Install NodeBB and it's dependencies:
<br />`npm install`
**Step 6:** Run the nodebb setup utility:
<br />`node app --setup`
URL of this installation should be set to 'http://workspace_name-c9-username.c9.io', replacing workspace_name with your workspace name and username with your username. Note that as NodeBB is currently using unsecure http for loading jQuery you will find it much easier using http:// instead of https:// for your base url. Otherwise jQuery won't load and NodeBB will break.
Port number isn't so important - Cloud9 may force you to use port 80 anyway. Just set it to 80. If this is another port, like 4567, that is also fine.
Use a port number to access NodeBB? Again, this doesn't seem to make a big difference. Set this to no. Either will work.
Host IP or address of your Redis instance: localhost (the output of the $IP Command is also acceptable)
IP or Hostname to bind to: Enter what your $IP value holds here found in step 4. It should look something like: 123.4.567.8
Host port of your Redis instance: 16379
Redis Password: Unless you have set one manually, Redis will be configured without a password. Leave this blank and press enter
First-time set-up will also require an Admin name, email address and password to be set.
And you're good to go! Don't use the Run button at the top if the IDE, it has been a little buggy for me. Besides, you're better off using the command line anyway. Run:
<br />`node app`
And then open http://workspace_name-c9-username.c9.io in your browser.
## Troubleshooting
A common problem is that the database hasn't been started. Make sure you have set Redis up correctly and ran <br />`redis-server --port 16379 --bind $IP`

@ -0,0 +1,40 @@
### Installation
**Note**: Installations to Heroku require a local machine with some flavour of unix, as NodeBB does not run on Windows.
1. Download and install [Heroku Toolbelt](https://toolbelt.heroku.com/) for your operating system
1. Log into your Heroku account: `heroku login`
1. Verify your Heroku account by adding a credit card (at http://heroku.com/verify)
1. Clone the repository: `git clone https://github.com/designcreateplay/NodeBB.git /path/to/repo/clone`
1. `cd /path/to/repo/clone`
1. Install dependencies locally `npm install`
1. Create the heroku app: `heroku create`
1. Enable WebSocket support (beta): `heroku labs:enable websockets -a {APP_NAME}`, where `{APP_NAME}` is provided by Heroku, and looks something like `adjective-noun-wxyz.herokuapp.com` (NOTE: [See this doc](https://discussion.heroku.com/t/application-error/160)): drop the `.herokuapp.com` when entering `{APP_NAME}` above.
1. Enable [Redis To Go](https://addons.heroku.com/redistogo) for your heroku account: `heroku addons:add redistogo:nano`
1. Run the NodeBB setup script: `node app --setup` (information for your Heroku server and Redis to Go instance can be found in your account page)
* Your server name is found in your Heroku app's "settings" page, and looks something like `adjective-noun-wxyz.herokuapp.com`
* Use any port number. It will be ignored.
* Specify "n" when asked if a port will be used. Heroku transparently proxies all requests.
* Your redis server can be found as part of the redis url. For example, for the url: `redis://redistogo:h28h3wgh37fns7@crestfish.redistogo.com:12345/`
* The server is `fishyfish.redistogo.com`
* The port is `12345`
* The password is `h28h3wgh37fns7`
1. Create a Procfile for Heroku: `echo "web: node app.js" > Procfile`
1. `git add -f Procfile config.json public/config.json && git commit -am "adding Procfile and configs for Heroku"`
1. Push to heroku: `git push heroku master`
* Ensure that a proper SSH key was added to your account, otherwise the push will not succeed!
1. Initialise a single dyno: `heroku ps:scale web=1`
1. Visit your app!
If these instructions are unclear or if you run into trouble, please let us know by [filing an issue](https://github.com/designcreateplay/NodeBB/issues).
### Keeping it up to date
If you wish to pull the latest changes from the git repository to your Heroku app:
1. Navigate to your repository at `/path/to/nodebb`
2. `git pull`
3. `npm install`
4. `node app --upgrade`
5. `git commit -am "upgrading to latest nodebb"
6. `git push heroku master`

@ -1,7 +1,11 @@
NodeBB Installation by OS
=========================
The following are step-by-step guides to help you get up and running. If your operating system is not listed here, please feel free to request a guide on our `community <https://community.nodebb.org>`_ or even better yet, submit one here.
The following are step-by-step guides to help you get up and running.
.. note::
If your operating system is not listed here, please feel free to request a guide on our `community <https://community.nodebb.org>`_ or even better yet, submit one here.

Loading…
Cancel
Save