Commit 7137e776 authored by nazarf's avatar nazarf

add production conf

parent 9448385f
...@@ -4,30 +4,11 @@ ...@@ -4,30 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9714672e-a423-436e-a8d6-e25573fece52" name="Changes" comment=""> <list default="true" id="9714672e-a423-436e-a8d6-e25573fece52" name="Changes" comment="set and check miner status">
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/controllers/miners_controller.rb" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/models/miner.rb" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/views/miners/_form.html.haml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/views/miners/edit.html.haml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/views/miners/index.html.haml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/views/miners/new.html.haml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/views/miners/show.html.haml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/db/migrate/20230312235403_create_miners.rb" afterDir="false" />
<change afterPath="$PROJECT_DIR$/test/controllers/miners_controller_test.rb" afterDir="false" />
<change afterPath="$PROJECT_DIR$/test/fixtures/miners.yml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/test/models/miner_test.rb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Gemfile" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Gemfile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/controllers/front_controller.rb" beforeDir="false" afterPath="$PROJECT_DIR$/app/controllers/front_controller.rb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/views/layouts/admin.html.haml" beforeDir="false" afterPath="$PROJECT_DIR$/app/views/layouts/admin.html.haml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/base_site.iml" beforeDir="false" afterPath="$PROJECT_DIR$/base_site.iml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/base_site.iml" beforeDir="false" afterPath="$PROJECT_DIR$/base_site.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/database.yml" beforeDir="false" afterPath="$PROJECT_DIR$/config/database.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/config/deploy.rb" beforeDir="false" afterPath="$PROJECT_DIR$/config/deploy.rb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/routes.rb" beforeDir="false" afterPath="$PROJECT_DIR$/config/routes.rb" afterDir="false" /> <change beforePath="$PROJECT_DIR$/config/deploy/production.rb" beforeDir="false" afterPath="$PROJECT_DIR$/config/deploy/production.rb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/db/schema.rb" beforeDir="false" afterPath="$PROJECT_DIR$/db/schema.rb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/db/seeds.rb" beforeDir="false" afterPath="$PROJECT_DIR$/db/seeds.rb" afterDir="false" />
</list> </list>
<list id="e4be6035-6aaa-4f44-85ea-6a3713a8155a" name=".idea" comment="" /> <list id="e4be6035-6aaa-4f44-85ea-6a3713a8155a" name=".idea" comment="" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -243,13 +224,28 @@ ...@@ -243,13 +224,28 @@
<updated>1678665447645</updated> <updated>1678665447645</updated>
<workItem from="1678665448925" duration="187000" /> <workItem from="1678665448925" duration="187000" />
<workItem from="1678665646686" duration="2018000" /> <workItem from="1678665646686" duration="2018000" />
<workItem from="1678919799908" duration="1347000" /> <workItem from="1678919799908" duration="4548000" />
<workItem from="1678925183855" duration="109000" />
<workItem from="1678925900403" duration="62000" />
<workItem from="1678926670884" duration="178000" />
</task> </task>
<task id="LOCAL-00001" summary="set and check miner status">
<created>1678921173455</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1678921173455</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" /> <option name="version" value="3" />
</component> </component>
<component name="VcsManagerConfiguration">
<MESSAGE value="set and check miner status" />
<option name="LAST_COMMIT_MESSAGE" value="set and check miner status" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl"> <component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/bsa_miner@db_seed__base_site.rcov" NAME="db:seed: base_site Coverage Results" MODIFIED="1678666605094" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="base_site" /> <SUITE FILE_PATH="coverage/bsa_miner@db_seed__base_site.rcov" NAME="db:seed: base_site Coverage Results" MODIFIED="1678666605094" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="base_site" />
<SUITE FILE_PATH="coverage/bsa_miner@dev_start.rcov" NAME="dev_start Coverage Results" MODIFIED="1678921028158" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="base_site" /> <SUITE FILE_PATH="coverage/bsa_miner@dev_start.rcov" NAME="dev_start Coverage Results" MODIFIED="1678921028158" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="base_site" />
......
...@@ -15,4 +15,28 @@ class FrontController < ApplicationController ...@@ -15,4 +15,28 @@ class FrontController < ApplicationController
render json: {status: 'ok'} render json: {status: 'ok'}
end end
def miners_activity
@data = Miner.all.map do |miner|
{
name: miner.name,
status: miner.status,
hash_rate: miner.hash_rate,
last_activity: miner.last_activity,
ip_address: miner.ip_address,
port: miner.port,
wallet_address: miner.wallet_address,
password: miner.password,
algorithm: miner.algorithm,
ip_address_2: miner.ip_address_2,
port_2: miner.port_2,
wallet_address_2: miner.wallet_address_2,
password_2: miner.password_2,
algorithm_2: miner.algorithm_2
}
end
render json: @data
end
end end
...@@ -62,30 +62,6 @@ class MinersController < AdminController ...@@ -62,30 +62,6 @@ class MinersController < AdminController
end end
end end
def miners_activity
@data = Miner.all.map do |miner|
{
name: miner.name,
status: miner.status,
hash_rate: miner.hash_rate,
last_activity: miner.last_activity,
ip_address: miner.ip_address,
port: miner.port,
wallet_address: miner.wallet_address,
password: miner.password,
algorithm: miner.algorithm,
ip_address_2: miner.ip_address_2,
port_2: miner.port_2,
wallet_address_2: miner.wallet_address_2,
password_2: miner.password_2,
algorithm_2: miner.algorithm_2
}
end
render json: @data
end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
......
...@@ -139,76 +139,98 @@ ...@@ -139,76 +139,98 @@
<component name="RailsGeneratorsCache"> <component name="RailsGeneratorsCache">
<option name="generators"> <option name="generators">
<list> <list>
<option value="active_record:migration" /> <option value="active_record:devise" />
<option value="active_record:model" /> <option value="assets" />
<option value="active_record:observer" /> <option value="bootstrap:install" />
<option value="active_record:session_migration" /> <option value="bootstrap:layout" />
<option value="bootstrap:partial" />
<option value="bootstrap:themed" />
<option value="ckeditor:action_policy" />
<option value="ckeditor:install" />
<option value="ckeditor:pundit_policy" />
<option value="coffee:assets" />
<option value="controller" /> <option value="controller" />
<option value="devise" />
<option value="devise:controllers" />
<option value="devise:i18n:locale" />
<option value="devise:i18n:views" />
<option value="devise:install" />
<option value="devise:views" />
<option value="erb:controller" /> <option value="erb:controller" />
<option value="erb:mailer" /> <option value="erb:mailer" />
<option value="erb:scaffold" /> <option value="erb:scaffold" />
<option value="generator" /> <option value="generator" />
<option value="haml:application_layout" />
<option value="helper" /> <option value="helper" />
<option value="integration_test" /> <option value="integration_test" />
<option value="jbuilder" />
<option value="job" />
<option value="js:assets" />
<option value="less:assets" />
<option value="mailer" /> <option value="mailer" />
<option value="metal" />
<option value="migration" /> <option value="migration" />
<option value="model" /> <option value="model" />
<option value="model_subclass" /> <option value="mongoid:devise" />
<option value="observer" /> <option value="nested_form:install" />
<option value="performance_test" />
<option value="plugin" />
<option value="resource" /> <option value="resource" />
<option value="responders:install" />
<option value="responders_controller" />
<option value="scaffold" /> <option value="scaffold" />
<option value="scaffold_controller" /> <option value="scaffold_controller" />
<option value="session_migration" /> <option value="simple_form:install" />
<option value="stylesheets" /> <option value="task" />
<option value="test_unit:controller" /> <option value="test_unit:generator" />
<option value="test_unit:helper" /> <option value="test_unit:job" />
<option value="test_unit:integration" />
<option value="test_unit:mailer" />
<option value="test_unit:model" />
<option value="test_unit:observer" />
<option value="test_unit:performance" />
<option value="test_unit:plugin" /> <option value="test_unit:plugin" />
<option value="test_unit:scaffold" /> <option value="uploader" />
</list> </list>
</option> </option>
<option name="myGenerators"> <option name="myGenerators">
<list> <list>
<option value="active_record:migration" /> <option value="active_record:devise" />
<option value="active_record:model" /> <option value="assets" />
<option value="active_record:observer" /> <option value="bootstrap:install" />
<option value="active_record:session_migration" /> <option value="bootstrap:layout" />
<option value="bootstrap:partial" />
<option value="bootstrap:themed" />
<option value="ckeditor:action_policy" />
<option value="ckeditor:install" />
<option value="ckeditor:pundit_policy" />
<option value="coffee:assets" />
<option value="controller" /> <option value="controller" />
<option value="devise" />
<option value="devise:controllers" />
<option value="devise:i18n:locale" />
<option value="devise:i18n:views" />
<option value="devise:install" />
<option value="devise:views" />
<option value="erb:controller" /> <option value="erb:controller" />
<option value="erb:mailer" /> <option value="erb:mailer" />
<option value="erb:scaffold" /> <option value="erb:scaffold" />
<option value="generator" /> <option value="generator" />
<option value="haml:application_layout" />
<option value="helper" /> <option value="helper" />
<option value="integration_test" /> <option value="integration_test" />
<option value="jbuilder" />
<option value="job" />
<option value="js:assets" />
<option value="less:assets" />
<option value="mailer" /> <option value="mailer" />
<option value="metal" />
<option value="migration" /> <option value="migration" />
<option value="model" /> <option value="model" />
<option value="model_subclass" /> <option value="mongoid:devise" />
<option value="observer" /> <option value="nested_form:install" />
<option value="performance_test" />
<option value="plugin" />
<option value="resource" /> <option value="resource" />
<option value="responders:install" />
<option value="responders_controller" />
<option value="scaffold" /> <option value="scaffold" />
<option value="scaffold_controller" /> <option value="scaffold_controller" />
<option value="session_migration" /> <option value="simple_form:install" />
<option value="stylesheets" /> <option value="task" />
<option value="test_unit:controller" /> <option value="test_unit:generator" />
<option value="test_unit:helper" /> <option value="test_unit:job" />
<option value="test_unit:integration" />
<option value="test_unit:mailer" />
<option value="test_unit:model" />
<option value="test_unit:observer" />
<option value="test_unit:performance" />
<option value="test_unit:plugin" /> <option value="test_unit:plugin" />
<option value="test_unit:scaffold" /> <option value="uploader" />
</list> </list>
</option> </option>
</component> </component>
......
...@@ -4,7 +4,7 @@ lock '3.7.2' ...@@ -4,7 +4,7 @@ lock '3.7.2'
# DEPLOY # DEPLOY
set :application, 'base_site' set :application, 'base_site'
# set :deploy_to, '/var/www/amaox' # Default deploy_to directory is /var/www/my_app_name # set :deploy_to, '/var/www/amaox' # Default deploy_to directory is /var/www/my_app_name
set :repo_url, 'http://svn.sp-service.com.ua/svnroot/svn/base_site/trunk' set :repo_url, 'http://deploy:zpxocivu73@git.sp-service.com.ua/nazarf/bsa_miner.git'
# set :format, :pretty # Default value for :format is :pretty # set :format, :pretty # Default value for :format is :pretty
# set :log_level, :debug # Default value for :log_level is :debug # set :log_level, :debug # Default value for :log_level is :debug
# set :pty, true # Default value for :pty is false # set :pty, true # Default value for :pty is false
...@@ -15,7 +15,7 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'public/uploads', 'files') ...@@ -15,7 +15,7 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'public/uploads', 'files')
# RVM # RVM
# set :rvm_type, :user # Defaults to: :auto # set :rvm_type, :user # Defaults to: :auto
set :rvm_ruby_version, '2.3.3' # Defaults to: 'default' set :rvm_ruby_version, '2.5.1' # Defaults to: 'default'
# set :rvm_custom_path, '~/.rvm' # only needed if not detected # set :rvm_custom_path, '~/.rvm' # only needed if not detected
# RAILS # RAILS
......
server 'storage.sp-service.com.ua', user: 'deploy', roles: %w{app db web} server '209.250.245.88', user: 'deploy', roles: %w{app db web}
# set :rvm_custom_path, '/usr/local/rvm' # only needed if not detected # set :rvm_custom_path, '/usr/local/rvm' # only needed if not detected
...@@ -32,7 +32,7 @@ Rails.application.routes.draw do ...@@ -32,7 +32,7 @@ Rails.application.routes.draw do
get '/' => 'front#index' get '/' => 'front#index'
get 'pages/:id' => 'front#page', as: :front_page get 'pages/:id' => 'front#page', as: :front_page
get '/miners_activity', to: 'miners#miners_activity', as: 'miners_activity' get '/miners_activity', to: 'front#miners_activity', as: 'miners_activity'
get '/update_miner_activity', to: 'front#update_miner_activity', as: 'update_miner_activity' get '/update_miner_activity', to: 'front#update_miner_activity', as: 'update_miner_activity'
root 'front#index' root 'front#index'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment