Skip to content

Commit

Permalink
Merge pull request #52 from RileyManda/dev
Browse files Browse the repository at this point in the history
Deployment
  • Loading branch information
RileyManda authored Oct 21, 2023
2 parents 698b6ca + dbf4bda commit 2aac648
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 25 deletions.
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.2'
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'bundler'
gem 'cssbundling-rails'
gem 'pg', '~> 1.5', '>= 1.5.4'
gem 'rails', '~> 7.0.8'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

# Use postgresql as the database for Active Record
gem 'pg', '~> 1.5', '>= 1.5.4'

# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '~> 5.0'

Expand Down
11 changes: 9 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ GEM
xpath (~> 3.2)
concurrent-ruby (1.2.2)
crass (1.0.6)
cssbundling-rails (1.3.3)
railties (>= 6.0.0)
date (3.3.3)
debug (1.8.0)
irb (>= 1.5.0)
Expand Down Expand Up @@ -146,13 +148,15 @@ GEM
nio4r (2.5.9)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pg (1.5.4)
psych (5.1.1)
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
puma (5.6.7)
Expand Down Expand Up @@ -247,7 +251,7 @@ GEM
stimulus-rails (1.3.0)
railties (>= 6.0.0)
stringio (3.0.8)
thor (1.2.2)
thor (1.3.0)
timeout (0.4.0)
turbo-rails (1.5.0)
actionpack (>= 6.0.0)
Expand Down Expand Up @@ -278,11 +282,14 @@ GEM
PLATFORMS
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
bootsnap
bundler
cancancan
capybara
cssbundling-rails
debug
devise (~> 4.9)
factory_bot_rails
Expand Down
1 change: 1 addition & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
css: yarn watch:css
css: yarn watch:css
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
<!-- - [🚀 Live Demo](#live-demo) -->
- [🚀 Live Demo](#live-demo)
- [💻 Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
Expand Down Expand Up @@ -101,15 +101,15 @@ Recipe-App is a web application that allows users to add, update, and delete foo
> View Lists: Food List | Recipe List | Shopping List

<!-- <p align="right">(<a href="#readme-top">back to top</a>)</p> -->
<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- LIVE DEMO -->
<!--

## 🚀 Live Demo <a name="live-demo"></a>

> Add a link to your deployed project.
> Live Demo of this application:
- [Live Demo Link](<replace-with-your-deployment-URL>) -->
- [Live Demo Link](https://recipe-app-mier.onrender.com/)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
3 changes: 0 additions & 3 deletions app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<li class="nav-item">
<%= link_to 'Recipes', recipe_index_path, class: 'nav-link' %>
</li>
<li class="nav-item">
<%= link_to 'Shopping', shopping_index_path, class: 'nav-link' %>
</li>
<li class="nav-item">
<%= link_to 'Public Recipes', public_recipes_path, class: 'nav-link' %>
</li>
Expand Down
7 changes: 7 additions & 0 deletions bin/render-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# exit on error
set -o errexit
bundle install
bundle exec rake assets:precompile
bundle exec rake assets:clean
bundle exec rake db:migrate
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module RecipeApp
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0
config.assets.enabled = true

# Configuration for the application, engines, and railties goes here.
#
Expand Down
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ production:
<<: *default
database: recipe_app_production
username: recipe_app
password: <%= ENV["RECIPE_APP_DATABASE_PASSWORD"] %>
password: <%= ENV['DATABASE_URL'] %>
5 changes: 3 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX

config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? || ENV['RENDER'].present?
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local

Expand Down Expand Up @@ -71,7 +71,7 @@
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true

config.assets.raise_runtime_errors = false
# Don't log any deprecations.
config.active_support.report_deprecations = false

Expand All @@ -90,4 +90,5 @@

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.action_cable.allowed_request_origins = [/https:\/\/*/]
end
3 changes: 2 additions & 1 deletion config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

# Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }

workers ENV.fetch("WEB_CONCURRENCY") { 4 }
preload_app!
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"nodemon": "^3.0.1",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0",
"sass": "^1.69.3"
"sass": "^1.69.4"
},
"scripts": {
"build:css:compile": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1756,10 +1756,10 @@ safe-buffer@~5.2.0:
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==

sass@^1.69.3:
version "1.69.3"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.3.tgz#f8a0c488697e6419519834a13335e7b65a609c11"
integrity sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ==
sass@^1.69.4:
version "1.69.4"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.4.tgz#10c735f55e3ea0b7742c6efa940bce30e07fbca2"
integrity sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
Expand Down

0 comments on commit 2aac648

Please sign in to comment.