Update Self Hosted Docs. Closes #868
parent
b49b128c60
commit
0d7fead82a
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
# Steps to Reproduce
|
# 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.
|
||||||
|
|
|
@ -54,40 +54,54 @@ cp config/database.example.yml config/database.yml
|
||||||
# Use micro! `snap install micro --classic`
|
# Use micro! `snap install micro --classic`
|
||||||
cp config/application.example.yml config/application.yml
|
cp config/application.example.yml config/application.yml
|
||||||
# READ THE FILE AND CHANGE THE VALUES ^
|
# 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
|
rake keys:generate
|
||||||
# Run this:
|
# Create the database for the app to use:
|
||||||
# CREATE USER "your_username_here" WITH SUPERUSER;
|
|
||||||
# \q
|
|
||||||
rake db:create:all db:migrate db:seed
|
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
|
RAILS_ENV=test rake db:create db:migrate && rspec spec
|
||||||
|
|
||||||
|
# Run UI-level unit tests:
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
# INSTALLATION IS NOW COMPLETE =================================================
|
# INSTALLATION IS NOW COMPLETE ===================================+
|
||||||
|
# You may run the commands below every time you start the server. |
|
||||||
|
# ================================================================+
|
||||||
|
|
||||||
|
# Runs the web server in new tab, but use SAME DIRECTORY AS BEFORE. Don't worry
|
||||||
# You may run the commands below every time you wish to start the server:
|
# about the "MQTT server is unreachable" messages yet- we still need to start
|
||||||
# The commands before this were only one-off commands for installation.
|
# MQTT (next).
|
||||||
# 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).
|
|
||||||
rails api:start
|
rails api:start
|
||||||
|
|
||||||
# Run MQTT (new tab, SAME DIRECTORY)
|
# Run MQTT (new tab or window, SAME DIRECTORY)
|
||||||
rails mqtt:start
|
rails mqtt:start
|
||||||
|
|
||||||
# NEXT STEP IS OPTIONAL. DO THIS IF YOU WANT TO USE PORT 80 INSTEAD OF 3000.
|
# 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.
|
# This is a quick alternative to running rails as root / sudo. |
|
||||||
|
# ==========================================================================+
|
||||||
|
|
||||||
# Step 1: Install `socat`
|
# Step 1: Install `socat`
|
||||||
sudo apt-get install socat
|
sudo apt-get install socat
|
||||||
|
|
||||||
# Step 2: Forward port 80 to port 3000
|
# Step 2: Forward port 80 to port 3000
|
||||||
sudo socat TCP-LISTEN:80,fork TCP:localhost:3000
|
sudo socat TCP-LISTEN:80,fork TCP:localhost:3000
|
||||||
|
|
||||||
# Other options for routing traffic to port 80 include:
|
# Other options for routing traffic to port 80 include:
|
||||||
# * Using `iptables`
|
# * Using `iptables`
|
||||||
# * Configuring NGinx as a reverse proxy.
|
# * Configuring NGinx as a reverse proxy.
|
||||||
# The options above are intended for advanced users.
|
# The options above are intended for advanced users. Our ability to provide
|
||||||
# Our ability to provide support to individual users for these use cases is
|
# support to individual users for these use cases is limited.
|
||||||
# limited
|
|
||||||
|
|
Loading…
Reference in New Issue