Update deployment information.
parent
10651414ab
commit
dee9f071a1
1
Gemfile
1
Gemfile
|
@ -36,7 +36,6 @@ group :development, :test do
|
|||
gem 'factory_girl_rails'
|
||||
gem 'faker'
|
||||
gem 'smarf_doc', github: 'RickCarlino/smarf_doc'
|
||||
# gem 'sqlite3'
|
||||
gem 'rails-erd'
|
||||
end
|
||||
|
||||
|
|
|
@ -27,12 +27,7 @@ The key responsibility of the API is *information and permissions management*. T
|
|||
|
||||
# Provisioning Your Own with Dokku
|
||||
|
||||
0. Create a fresh Ubuntu 14 server with Dokku (or just use DigitalOcean)
|
||||
0. [Upgrade to the latest version of Dokku](https://github.com/dokku/dokku/blob/master/docs/upgrading.md) (especially if you are on DigitalOcean- their version is out of date)
|
||||
0. Install dokku-haproxy plugin: `ssh root@YOUR_SERVER dokku plugin:install https://github.com/256dpi/dokku-haproxy.git`
|
||||
0. Deploy: `git push dokku@YOUR_SERVER:mqtt`
|
||||
0. Point to correct host/port: `ssh dokku@MQTT_SERVER config:set mqtt PORT=3002 DOKKU_NGINX_PORT=3002 WEB_APP_URL=WEBAPP_URL_HERE`
|
||||
0. Expose MQTT port: `ssh dokku@MQTT_SERVER ports:add mqtt 1883 web 1883`
|
||||
Please see `deployment.md`.
|
||||
|
||||
# Config Settings (important)
|
||||
|
||||
|
|
10
db/seeds.rb
10
db/seeds.rb
|
@ -1,5 +1,7 @@
|
|||
# User for testing purposes:
|
||||
Users::Create.run!(name: "Administrator",
|
||||
email: "admin@admin.com",
|
||||
password: "password123",
|
||||
password_confirmation: "password123")
|
||||
unless Rails.env == "production"
|
||||
Users::Create.run!(name: "Administrator",
|
||||
email: "admin@admin.com",
|
||||
password: "password123",
|
||||
password_confirmation: "password123")
|
||||
end
|
||||
|
|
|
@ -5,20 +5,23 @@
|
|||
* Make sure you have atleast 1gb.
|
||||
0. [Install the latest version of Dokku (don't use that DigitalOcean image)](https://github.com/dokku/dokku#installing)
|
||||
0. Setup Dokku by visiting the server's URL. Follow the directions on screen.
|
||||
0. `git remote add my_server dokku@138.68.19.190:my-api-name`
|
||||
0. `git remote add my_server dokku@your-server:my-api-name`
|
||||
0. Install mariaDB plugin: [instructions](https://github.com/dokku/dokku-mariadb).
|
||||
0. Create a databse: `ssh dokku@your-server mariadb:create my_db`
|
||||
0. Link the DB: `ssh dokku@your-server mariadb:link my_db my-api-name`
|
||||
0. Set ENV vars:
|
||||
* `ssh dokku@staging-next config:set my-api-name DEVISE_SECRET=$(rake secret)`
|
||||
* `ssh dokku@staging-next config:set my-api-name JS_FILE_URL=//mycdn.org/farmbot-fronted.js`
|
||||
* `ssh dokku@staging-next config:set my-api-name MQTT_HOST=my-mqtt-server.org`
|
||||
* `ssh dokku@staging-next config:set my-api-name DATABASE_URL=mysql://dbusername:dbpassword@dburl:dbport/dbname`
|
||||
* `ssh dokku@your-server config:set my-api-name DEVISE_SECRET=$(rake secret)`
|
||||
* `ssh dokku@your-server config:set my-api-name JS_FILE_URL=//mycdn.org/farmbot-fronted.js`
|
||||
* `ssh dokku@your-server config:set my-api-name MQTT_HOST=my-mqtt-server.org`
|
||||
* `ssh dokku@your-server config:set my-api-name DATABASE_URL=mysql://dbusername:dbpassword@dburl:dbport/dbname`
|
||||
0. Migrate / create db: `ssh dokku@your-server run my-api-name rake db:setup`
|
||||
|
||||
# Old / Legacy Setup
|
||||
|
||||
(Added Sept. 2016)
|
||||
|
||||
No longer used, but possibly relevant for those running legacy servers.
|
||||
|
||||
0. Create a fresh Ubuntu 14 server with Dokku (or just use DigitalOcean)
|
||||
0. [Upgrade to the latest version of Dokku](https://github.com/dokku/dokku/blob/master/docs/upgrading.md) (especially if you are on DigitalOcean- their version is out of date)
|
||||
0. Install dokku-haproxy plugin: `ssh root@YOUR_SERVER dokku plugin:install https://github.com/256dpi/dokku-haproxy.git`
|
||||
|
|
Loading…
Reference in New Issue