Update Self Hosted Docs. Closes #868

pull/869/head
Rick Carlino 2018-05-27 13:41:18 -05:00
parent b49b128c60
commit 0d7fead82a
2 changed files with 34 additions and 20 deletions

View File

@ -4,6 +4,6 @@
# Steps to Reproduce
# My FarmBot API Version
# Results of `git log -1`
Run `git log -1` and paste the results here
Run `git log -1` and paste the results here.

View File

@ -54,40 +54,54 @@ cp config/database.example.yml config/database.yml
# Use micro! `snap install micro --classic`
cp config/application.example.yml config/application.yml
# READ THE FILE AND CHANGE THE VALUES ^
sudo -u postgres psql
# Next, we need to set some thing up in PostgreSQL
# Run this command...
sudo -u postgres psql
# Now that you are in the PSQL command prompt, enter these commands:
#
# CREATE USER "your_system_username_here" WITH SUPERUSER;
# \q
#
# ...after running `\q` we are back to the shell- Continue installation as
# usual.
# Generate a set of *.pem files for data encryption:
rake keys:generate
# Run this:
# CREATE USER "your_username_here" WITH SUPERUSER;
# \q
# Create the database for the app to use:
rake db:create:all db:migrate db:seed
# Run the database migration and unit tests (API only)
RAILS_ENV=test rake db:create db:migrate && rspec spec
# Run UI-level unit tests:
npm run test
# INSTALLATION IS NOW COMPLETE =================================================
# INSTALLATION IS NOW COMPLETE ===================================+
# You may run the commands below every time you start the server. |
# ================================================================+
# You may run the commands below every time you wish to start the server:
# The commands before this were only one-off commands for installation.
# Run the web server (new tab, SAME DIRECTORY)
# Don't worry about the "MQTT server is unreachable" messages yet-
# we still need to start MQTT (next).
# Runs the web server in new tab, but use SAME DIRECTORY AS BEFORE. Don't worry
# about the "MQTT server is unreachable" messages yet- we still need to start
# MQTT (next).
rails api:start
# Run MQTT (new tab, SAME DIRECTORY)
# Run MQTT (new tab or window, SAME DIRECTORY)
rails mqtt:start
# NEXT STEP IS OPTIONAL. DO THIS IF YOU WANT TO USE PORT 80 INSTEAD OF 3000.
# This is a quick alternative to running rails as root / sudo.
# RUNNING ON PORT 80 =======================================================+
# NEXT STEP IS OPTIONAL. DO THIS IF YOU WANT TO USE PORT 80 INSTEAD OF 3000.|
# This is a quick alternative to running rails as root / sudo. |
# ==========================================================================+
# Step 1: Install `socat`
sudo apt-get install socat
# Step 2: Forward port 80 to port 3000
sudo socat TCP-LISTEN:80,fork TCP:localhost:3000
# Other options for routing traffic to port 80 include:
# * Using `iptables`
# * Configuring NGinx as a reverse proxy.
# The options above are intended for advanced users.
# Our ability to provide support to individual users for these use cases is
# limited
# The options above are intended for advanced users. Our ability to provide
# support to individual users for these use cases is limited.