Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku-ready version of Staytus #240

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
source 'https://rubygems.org'
ruby '2.4.4'

gem 'rails', '~> 5.1'
gem 'mysql2'
gem 'pg'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ GEM
deep_merge (~> 1.0)
json (~> 1.7)
rack (>= 1.4)
mysql2 (0.4.10)
nifty-attachments (1.0.4)
nifty-utils (1.1.7)
nilify_blanks (1.3.0)
Expand All @@ -147,6 +146,7 @@ GEM
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
numerizer (0.1.1)
pg (1.0.0)
phony (2.16.3)
premailer (1.11.1)
addressable
Expand Down Expand Up @@ -241,10 +241,10 @@ DEPENDENCIES
kaminari
log_logins
moonrope
mysql2
nifty-attachments
nifty-utils
nilify_blanks
pg
premailer
puma
rack-custom-proxies
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ any issues with your web applications, networks or services. Along with
absolutely beautiful public & admin interfaces, Staytus is a powerful tool for
any organization with customers that rely on them to be online 24/7.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

* [Check out the live demo](http://demo.staytus.co)
* [Read the roadmap](https://github.com/adamcooke/staytus/blob/master/ROADMAP.md)
* [Report a bug](https://github.com/adamcooke/staytus/issues/new?labels=bug)
Expand Down
63 changes: 63 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "Staytus",
"description": "An open source solution for publishing the status of your services",
"keywords": [
"status"
],
"website": "http://staytus.co/",
"repository": "https://github.com/adamcooke/staytus",
"logo": "https://raw.githubusercontent.com/ideasasylum/staytus/master/app/assets/images/favicon.png",
"success_url": "/",
"scripts": {
"postdeploy": "bundle exec rake staytus:build staytus:install"
},
"env": {
"SECRET_TOKEN": {
"description": "A secret key for verifying the integrity of signed cookies.",
"generator": "secret"
},
"STAYTUS_THEME": {
"description": "The theme to use",
"value": "default"
},
"STAYTUS_DEMO": {
"description": "If enabled, the application will allow any username/password combination to login to the admin area.",
"value": "0"
},
"FORCE_SSL": {
"description": "Configure SSL to be forced (ensuring HSTS headers are sent and cookies are all secure)",
"value": "1"
},
"STAYTUS_SMTP_HOSTNAME": {
"description": "SMTP server name",
"required": true
},
"STAYTUS_SMTP_PORT": {
"description": "SMTP server port",
"required": true
},
"STAYTUS_SMTP_USERNAME": {
"description": "SMTP server username",
"required": true
},
"STAYTUS_SMTP_PASSWORD": {
"description": "SMTP server password",
"required": true
}
},
"formation": {
"web": {
"quantity": 1,
"size": "free"
}
},
"image": "heroku/ruby",
"addons": [
{
"plan": "heroku-postgresql:hobby-dev",
"options": {
"version": "9.5"
}
}
]
}
Binary file added app/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions config/database.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
# to specify the database to connect to.

default: &default
adapter: mysql2
encoding: utf8
adapter: postgresql
encoding: unicode
pool: 5
username: staytus
password:
database: staytus
host: 127.0.0.1

production:
<<: *default

development:
<<: *default
database: staytus_dev

test:
<<: *default
Expand Down
38 changes: 19 additions & 19 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

ActiveRecord::Schema.define(version: 20180425131827) do

create_table "api_tokens", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "api_tokens", force: :cascade do |t|
t.string "name"
t.string "token"
t.string "secret"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "authie_sessions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "authie_sessions", force: :cascade do |t|
t.string "token"
t.string "browser_id"
t.integer "user_id"
Expand Down Expand Up @@ -49,7 +49,7 @@
t.index ["user_id"], name: "index_authie_sessions_on_user_id"
end

create_table "delayed_jobs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "delayed_jobs", force: :cascade do |t|
t.integer "priority", default: 0, null: false
t.integer "attempts", default: 0, null: false
t.text "handler", null: false
Expand All @@ -64,28 +64,28 @@
t.index ["priority", "run_at"], name: "delayed_jobs_priority"
end

create_table "email_templates", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "email_templates", force: :cascade do |t|
t.string "name"
t.string "subject"
t.text "content"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "history_items", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "history_items", force: :cascade do |t|
t.string "item_type"
t.integer "item_id"
t.datetime "date"
end

create_table "issue_service_joins", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "issue_service_joins", force: :cascade do |t|
t.integer "issue_id"
t.integer "service_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "issue_updates", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "issue_updates", force: :cascade do |t|
t.integer "issue_id"
t.integer "user_id"
t.integer "service_status_id"
Expand All @@ -97,7 +97,7 @@
t.boolean "notify", default: false
end

create_table "issues", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "issues", force: :cascade do |t|
t.string "title"
t.string "state"
t.integer "service_status_id"
Expand All @@ -109,7 +109,7 @@
t.boolean "notify", default: false
end

create_table "login_events", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
create_table "login_events", id: :integer, force: :cascade do |t|
t.string "user_type"
t.integer "user_id"
t.string "username"
Expand All @@ -126,14 +126,14 @@
t.index ["user_type", "user_id"], name: "index_login_events_on_user_type_and_user_id", length: { user_type: 10 }
end

create_table "maintenance_service_joins", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "maintenance_service_joins", force: :cascade do |t|
t.integer "maintenance_id"
t.integer "service_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "maintenance_updates", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "maintenance_updates", force: :cascade do |t|
t.integer "maintenance_id"
t.integer "user_id"
t.text "text"
Expand All @@ -143,7 +143,7 @@
t.boolean "notify", default: false
end

create_table "maintenances", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "maintenances", force: :cascade do |t|
t.string "title"
t.text "description"
t.datetime "start_at"
Expand All @@ -158,7 +158,7 @@
t.boolean "notify", default: false
end

create_table "nifty_attachments", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "nifty_attachments", force: :cascade do |t|
t.integer "parent_id"
t.string "parent_type"
t.string "token"
Expand All @@ -171,13 +171,13 @@
t.datetime "updated_at"
end

create_table "service_groups", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "service_groups", force: :cascade do |t|
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "service_statuses", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "service_statuses", force: :cascade do |t|
t.string "name"
t.string "permalink"
t.string "color"
Expand All @@ -186,7 +186,7 @@
t.datetime "updated_at", null: false
end

create_table "services", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "services", force: :cascade do |t|
t.string "name"
t.string "permalink"
t.integer "position"
Expand All @@ -197,7 +197,7 @@
t.integer "group_id"
end

create_table "sites", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "sites", force: :cascade do |t|
t.string "title"
t.string "description"
t.string "domain"
Expand All @@ -212,15 +212,15 @@
t.string "privacy_policy_url"
end

create_table "subscribers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "subscribers", force: :cascade do |t|
t.string "email_address"
t.string "verification_token"
t.datetime "verified_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
create_table "users", force: :cascade do |t|
t.string "email_address"
t.string "name"
t.string "password_digest"
Expand Down