Skip to content

Commit ee76098

Browse files
committed
first badger commit
1 parent d887dd8 commit ee76098

File tree

6 files changed

+81
-0
lines changed

6 files changed

+81
-0
lines changed

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ gem 'rails', '~> 5.2.3'
77
gem 'pg', '>= 0.18', '< 2.0'
88
gem 'puma', '~> 3.11'
99
gem 'bootsnap', '>= 1.1.0', require: false
10+
gem 'newrelic_rpm'
11+
gem 'pghero'
12+
gem 'badger-rails'
1013

1114
group :development, :test do
1215
# Call 'byebug' anywhere in the code to stop execution and get a debugger console

Gemfile.lock

+21
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ GEM
4242
i18n (>= 0.7, < 2)
4343
minitest (~> 5.1)
4444
tzinfo (~> 1.1)
45+
airbrussh (1.4.0)
46+
sshkit (>= 1.6.1, != 1.7.0)
4547
arel (9.0.0)
48+
badger-rails (1.0.4)
49+
capistrano
4650
bindex (0.6.0)
4751
bootsnap (1.4.2)
4852
msgpack (~> 1.0)
4953
builder (3.2.3)
5054
byebug (11.0.1)
55+
capistrano (3.12.0)
56+
airbrussh (>= 1.0.0)
57+
i18n
58+
rake (>= 10.0.0)
59+
sshkit (>= 1.9.0)
5160
concurrent-ruby (1.1.5)
5261
crass (1.0.4)
5362
erubi (1.8.0)
@@ -73,10 +82,16 @@ GEM
7382
mini_portile2 (2.4.0)
7483
minitest (5.11.3)
7584
msgpack (1.2.9)
85+
net-scp (2.0.0)
86+
net-ssh (>= 2.6.5, < 6.0.0)
87+
net-ssh (5.2.0)
88+
newrelic_rpm (6.8.0.360)
7689
nio4r (2.3.1)
7790
nokogiri (1.10.2)
7891
mini_portile2 (~> 2.4.0)
7992
pg (1.1.4)
93+
pghero (2.4.1)
94+
activerecord (>= 5)
8095
puma (3.12.1)
8196
rack (2.0.6)
8297
rack-test (1.1.0)
@@ -117,6 +132,9 @@ GEM
117132
actionpack (>= 4.0)
118133
activesupport (>= 4.0)
119134
sprockets (>= 3.0.0)
135+
sshkit (1.20.0)
136+
net-scp (>= 1.1.2)
137+
net-ssh (>= 2.8.0)
120138
thor (0.20.3)
121139
thread_safe (0.3.6)
122140
tzinfo (1.2.5)
@@ -134,10 +152,13 @@ PLATFORMS
134152
ruby
135153

136154
DEPENDENCIES
155+
badger-rails
137156
bootsnap (>= 1.1.0)
138157
byebug
139158
listen (>= 3.0.5, < 3.2)
159+
newrelic_rpm
140160
pg (>= 0.18, < 2.0)
161+
pghero
141162
puma (~> 3.11)
142163
rails (~> 5.2.3)
143164
tzinfo-data

config/badger.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
username: "typically root"
2+
password: "server password"
3+
domain: "domain or ip of the server"
4+
port: "ssh port usually port 22"
5+
redis: false #true will host redis locally
6+
environment: "production" # or "staging", development and testing are excluded.
7+

config/newrelic.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
3+
# .NET, PHP, Python, Node, and Go applications with deep visibility and low
4+
# overhead. For more information, visit www.newrelic.com.
5+
#
6+
# Generated February 16, 2020
7+
#
8+
# This configuration file is custom generated for [email protected]
9+
#
10+
# For full documentation of agent configuration options, please refer to
11+
# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration
12+
13+
common: &default_settings
14+
# Required license key associated with your New Relic account.
15+
license_key: eu01xxc4fdf06fbcb3ca00aab6d200b826faNRAL
16+
17+
# Your application name. Renaming here affects where data displays in New
18+
# Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
19+
app_name: My Application
20+
21+
# To disable the agent regardless of other settings, uncomment the following:
22+
# agent_enabled: false
23+
24+
# Logging level for log/newrelic_agent.log
25+
log_level: info
26+
27+
28+
# Environment-specific settings are in this section.
29+
# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
30+
# If your application has other named environments, configure them here.
31+
development:
32+
<<: *default_settings
33+
app_name: My Application (Development)
34+
35+
test:
36+
<<: *default_settings
37+
# It doesn't make sense to report to New Relic from automated test runs.
38+
monitor_mode: false
39+
40+
staging:
41+
<<: *default_settings
42+
app_name: My Application (Staging)
43+
44+
production:
45+
<<: *default_settings

config/postgresql.conf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
shared_preload_libraries = 'pg_stat_statements'
2+
pg_stat_statements.track = all
3+
pg_stat_statements.max = 10000
4+
track_activity_query_size = 2048

config/routes.rb

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
33
get "/" => "statistics#index"
44
get "автобусы/:from/:to" => "trips#index"
5+
mount PgHero::Engine, at: "pghero"
56
end

0 commit comments

Comments
 (0)