Farmbot-Web-App/README.md

60 lines
3.2 KiB
Markdown
Raw Normal View History

2015-11-24 11:51:09 -07:00
[![Code Climate](https://codeclimate.com/github/FarmBot/farmbot-web-app/badges/gpa.svg)](https://codeclimate.com/github/FarmBot/farmbot-web-app)
2015-03-13 05:12:25 -06:00
[![Test Coverage](https://codeclimate.com/github/FarmBot/farmbot-web-app/badges/coverage.svg)](https://codeclimate.com/github/FarmBot/farmbot-web-app)
2015-11-24 11:51:09 -07:00
[![Build Status](https://travis-ci.org/FarmBot/farmbot-web-app.svg)](https://travis-ci.org/FarmBot/farmbot-web-app)
2015-08-19 09:37:13 -06:00
# Do I need this?
2015-08-19 09:37:13 -06:00
2016-03-24 09:02:48 -06:00
This repository is intended for *software developers* who wish to modify the [Farmbot Web App](http://my.farmbot.io/). **If you are not a developer**, you are highly encouraged to use [the publicly available web app](http://my.farmbot.io/).
2015-08-19 09:37:13 -06:00
If you are a developer interested in contributing or would like to provision your own server, you are in the right place.
2015-03-13 05:12:25 -06:00
# Farmbot Web App
2014-03-11 20:58:53 -06:00
2015-11-25 13:00:22 -07:00
**[LATEST STABLE VERSION IS HERE](https://github.com/FarmBot/farmbot-web-app/tree/dcf7cecf83d4b489ec55620f30614cc6b7c202f3)** :star: :star: :star:
2015-11-25 12:59:54 -07:00
2015-03-13 05:12:25 -06:00
This Repo is the Web based side of FarmBot. It allows users to control the device from their web browser. **We're getting closer to launch, but it this is an unstable pre-alpha repo.**
# Developer setup
0. `git clone git@github.com:FarmBot/farmbot-web-app.git`
0. `cd farmbot-web-app`
0. [Install MongoDB](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)
0. Start Mongo if you have not already done so. (typically via the `mongod` command)
0. `bundle install`
0. `rails s`
0. Go to `http://localhost:3000`
# Provisioning your own with Dokku
2015-12-15 17:23:00 -07:00
0. Get a Dokku instance running. HINT: DigitalOcean offers one click images.
0. Run `dokku plugin:install https://github.com/dokku/dokku-mongo.git mongo` on the server.
0. Push the app to the dokku server
0. dokku mongo:create web_app_staging
0. (on server) `dokku mongo:link web_app_staging 00-default`
2016-03-25 07:48:31 -06:00
# Config Settings (important)
Here are some of the configuration options you must set when provisioning a new server:
* **Encryption keys**: Encryption keys will be autogenerated if not present. They can be reset using `rake keys:generate`. If `ENV['RSA_KEY']` is set, it will be used in place of the `*.pem` files. Useful for environments like Heroku, where file system access is not allowed.
* `ENV['MONGO_URL']`: URL pointing to running MongoDB instance.
* `ENV['DEVISE_SECRET']`: Used for devise. Use `rake secret` to generate a new value.
* `ENV['MQTT_URL']`: URL of running [MQTT gateway](https://github.com/FarmBot/mqtt-gateway). This is required so that Farmbot can know where to connect when given an authorization token.
2015-12-15 17:23:00 -07:00
2015-11-24 11:51:09 -07:00
The frontend (and asset management) are very much in a transitional state. We're experimenting with Gulp as an alternative
2014-03-11 20:58:53 -06:00
2015-08-19 09:37:13 -06:00
**We can't fix issues we don't know about.** Please submit an issue if you are having trouble installing on your local machine.
2015-08-19 09:37:13 -06:00
## Running Specs
2015-08-19 09:37:13 -06:00
Please run them before submitting pull requests.
* `bundle exec rspec spec`
2014-03-11 20:58:53 -06:00
# How to Contribute
* Pull requests are always appreciated, but *please*
* Write tests.
* Follow the [Ruby Community Style Guide](https://github.com/bbatsov/ruby-style-guide).
* Raise issues. We love to know about issues. Even the issues you think are only relevant to your setup. Just submit issues if you have issues.