$ bundle exec rails generate rspec:install
$ bundle exec rails generate sidekiq:worker Hard
$ bundle exec cap install
$ bundle exec rails webpack:install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -xe | |
| export MB_DB_TYPE=mysql | |
| export MB_DB_DBNAME=metabase | |
| export MB_DB_PORT=3306 | |
| export MB_DB_USER=USERNAME | |
| export MB_DB_PASS=PASSWORD | |
| export MB_DB_HOST=localhost | |
| export MB_JETTY_PORT=12345 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :stage, :production | |
| set :branch, :master | |
| set :deploy_to, '/opt/FOOBAR' | |
| set :rails_env, 'production' | |
| server 'SEVER_ADDRESS(NAME)', user: 'USERNAME', roles: %w{web app db} | |
| set :ssh_options, { | |
| keys: [File.expand_path('USER_KEY')] | |
| } | |
| set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn.production.pid" | |
| set :unicorn_config_path, "#{release_path}/config/unicorn.production.rb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :stage, :development | |
| set :branch, :development | |
| set :deploy_to, '/opt/FOOBAR' | |
| set :rails_env, 'development' | |
| server 'SEVER_ADDRESS(NAME)', user: 'USERNAME', roles: %w{web app db} | |
| set :ssh_options, { | |
| keys: [File.expand_path('USER_KEY')] | |
| } | |
| set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn.development.pid" | |
| set :unicorn_config_path, "#{release_path}/config/unicorn.development.rb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lock '3.10.2' | |
| set :application, 'APP_NAME' | |
| set :repo_url, 'REPO_URI' | |
| set :linked_dirs, %w(log tmp/pids tmp/cache tmp/sockets bundle) # public は微妙なので場合に応じて | |
| set :rbenv_type, :user # :system(/usr/local/rbenv) or :user(~/.rbenv) | |
| set :rbenv_ruby, '2.5.1' | |
| set :linked_files, ['config/master.key'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "capistrano/setup" | |
| require "capistrano/deploy" | |
| require "capistrano/scm/git" | |
| install_plugin Capistrano::SCM::Git | |
| require "capistrano/rbenv" | |
| require "capistrano/rails" | |
| require "capistrano3/unicorn" | |
| require "capistrano/rails/console" | |
| require 'capistrano/yarn' | |
| Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/tablexi/capistrano3-unicorn/blob/master/examples/unicorn.rb | |
| worker_processes 2 | |
| listen 12345 | |
| before_exec do |server| | |
| ENV['BUNDLE_GEMFILE'] = '/var/tmp/foobar/current/Gemfile' | |
| end | |
| shared_path = '/var/tmp/foobar/shared' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| ruby '2.5.0' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '~> 5.2.0' | |
| # Use sqlite3 as the database for Active Record | |
| gem 'sqlite3' | |
| # Use SCSS for stylesheets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'faraday' | |
| connection = Faraday.new | |
| connection.post do |request| | |
| request.url 'https://api.chatwork.com/v2/rooms/YOUR_ROOM_ID/messages' | |
| request.headers['X-ChatWorkToken'] = 'YOUR CHATWORK TOKEN' | |
| request.body = { body: '[info][title]ここにタイトルが入る[/title]ここに本文が入る[/info]' } | |
| end |