Application to plan events (with calendar, map, photo-sharing and e-mail notifications).
- Registration&Authorization (Devise)
- Avatar & Photo upload (Carrierwave, RMagick)
- OmniAuth (GitHub OAuth, VK OAuth)
- Users e-mail notification (ActionMailer + MailJet) powered as side-job with Redis + Resque + Capistrano
- Required Ruby (v. 3.1.2) & Rails (v. 7) installed on your PC.
- Clone application to local PC:
git clone git@github.com:Godlikefreq/bbq.git
- Run
bundle install
-
To specify database name, adapter and other parameters for different scopes change it in
config/database.yml
. Default DB adapter is PostgreSQL (Install PostgreSQL on Ubuntu 20.04). -
Make new database (Create DB in PostgreSQL).
-
Run
bundle exec rails db:migrate
- Create Mailjet account (Registration) and setup new sender.
- Make
.env
file in root directory. - Configure ENV variables:
MAILJET_API_KEY = ******
MAILJET_SECRET_KEY = ******
MAILJET_SENDER = ******
- Configure
config/environments/production.rb
:
config.action_mailer.asset_host = 'http://myapp.example.com'
config.action_mailer.default_url_options = { :host => "myapp.example.com"}
Install and configure Redis (Instruction for Ubuntu 20.04)
- Configure
config/deploy.rb
:
set :application, "appname"
set :repo_url, "git@github.com:User/myapp.git"
# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/username/appname"
set :branch, "main"
- Configure
config/deploy/production.rb
:
server "myapp.example.com", user: "username", roles: %w{app db web resque_worker}
set :resque_environment_task, true
set :workers, { "#{fetch(:application)}*" => 1 }
VK_API_ID = ******
VK_API_SECRET = ******
GITHUB_ID = ******
GITHUB_SECRET = ******
- To run application on your local machine run following command in console:
rails s
- Open
http://localhost:3000/
in your browser.
Deploy new versions of application with:
cap production deploy
- Powered with Bootstrap 5
- Made and tested on Ruby 3.1.2 & Rails 7