diff --git a/ubuntu_example.sh b/ubuntu_example.sh index 6a67ea0b6..1eb0831a3 100644 --- a/ubuntu_example.sh +++ b/ubuntu_example.sh @@ -1,13 +1,16 @@ -# How to install FarmBot Web API on a Fresh Ubuntu 18.04.1 LTS Machine +# How to install FarmBot Web API on a Fresh Ubuntu 18.10 Machine # IMPORTANT NOTE: Resources are limited and Farmbot, inc. cannot provide -# longterm support to self-hosted users. For users who have never administered a -# Ruby on Rails applications, this presents an extremely high risk of data loss. +# longterm support to self-hosted users. If you have never administered a +# Ruby on Rails application, we highly advise stopping now. this presents an +# extremely high risk of data loss. Free hosting is provided at +# https://my.farm.bot and eliminates the risks and troubles of self-hosting. # -# IF YOU ARE NOT A DEVELOPER you are highly encouraged to use the my.farm.bot -# servers. Self hosted documentation is provided with the assumption that you -# have experience with Ruby/Javascript development. Self-hosting a Farmbot -# server is not a simple task. +# You are highly encouraged to use the my.farm.bot servers. Self hosted +# documentation is provided with the assumption that you have experience with +# Ruby/Javascript development. +# +# Self-hosting a Farmbot server is not a simple task. # Remove old (possibly broke) docker versions sudo apt-get remove docker docker-engine docker.io @@ -25,7 +28,7 @@ sudo chmod +x /usr/local/bin/docker-compose # Install FarmBot Web App # ⚠ SKIP THIS STEP IF UPGRADING! -git clone https://github.com/FarmBot/Farmbot-Web-App --depth=10 --branch=master +git clone https://github.com/FarmBot/Farmbot-Web-App --depth=5 --branch=master cd Farmbot-Web-App @@ -50,19 +53,23 @@ sudo docker-compose run web bundle exec rails db:create db:migrate # Generate a set of *.pem files for data encryption sudo docker-compose run web rake keys:generate # ⚠ SKIP THIS STEP IF UPGRADING! # Build the UI assets via ParcelJS -sudo docker-compose run web npm run build +sudo docker-compose run web rake assets:precompile # Run the server! ٩(^‿^)۶ +# NOTE: DONT TRY TO LOGIN until you see a message similar to this: +# "✨ Built in 44.92s" +# You will just get an empty screen otherwise. +# This only happens during initialization sudo docker-compose up -# === +# === BEGIN OPTIONAL UPGRADES # To update to later versions of FarmBot, # shut down the server, create a database backup # and run commands below. git pull https://github.com/FarmBot/Farmbot-Web-App.git master - sudo docker-compose run web bundle install - sudo docker-compose run web npm install - sudo docker-compose run web rails db:migrate -# === + sudo docker-compose run web bundle install # <== ⚠ UPGRADE USERS ONLY + sudo docker-compose run web npm install # <== ⚠ UPGRADE USERS ONLY + sudo docker-compose run web rails db:migrate # <== ⚠ UPGRADE USERS ONLY +# === END OPTIONAL UPGRADES ^ # At this point, setup is complete. Content should be visible at =============== # http://YOUR_HOST:3000/.