Skip to content

mishina2228/youtube-api-trial

Repository files navigation

YouTube API Trial

CI Maintainability codecov GitHub license JavaScript Style Guide Ruby Style Guide

YouTube channels info collector

List Show

Prerequisites

  • Ruby 3.2+
  • Node.js 14.17.0+ || 16.0.0+
  • Yarn 1.x+

Installation

Set up Rails app

First, install the gems and javascript packages required by the application:

  • development
bundle install
yarn install
  • production
bundle config set without development test
bundle install
yarn install --production

Next, execute the database migrations/schema setup:

RAILS_ENV=[RAILS_ENV] bin/rails db:setup

Resque settings

Create a configuration file to manage Resque and resque-scheduler with God

RAILS_ENV=[RAILS_ENV] bundle exec itamae local config/itamae/resque.rb

Load configuration file

god -c /etc/god/master.conf

Resque, resque-scheduler operation with God

  • check the status
  • start
  • restart
  • stop
god status youtube_api_trial
god start youtube_api_trial
god restart youtube_api_trial
god stop youtube_api_trial

Start the app

  • development
bin/dev
  • production
RAILS_ENV=production bin/rails assets:precompile
bin/rails s -e production

Configuration Files

Notify when Resque job failed

If a Resque job fails, a notification email will be sent.
Please fill in the settings of email to config/mail.yml.
The following is an example when sending from Gmail:

production:
  delivery_method: :smtp
  smtp_settings:
    address: 'smtp.gmail.com'
    port: 587
    domain: 'gmail.com'
    user_name: [USER_NAME]
    password: [PASSWORD]
    authentication: 'plain'
    enable_starttls_auto: true

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request