This is a Ruby on Rails 7 app. It does the following:
Follow these instructions to get the app running locally.
# install dependencies
brew bundle
# create a YAML file to stub environment variables
$ mv config/env.yml.example config/env.yml
$ vi config/env.yml
# set up database
$ rails db:setup
# install dependencies
$ bundle
$ yarn
# start the rails web server
$ rails s
# start the webpack dev server
$ ./bin/shakapacker-dev-server
# start the guard watcher for tests and code formatting
$ guard
This is a Rails app, deployed on Heroku.
It uses Heroku Postgresql, configured via DATABASE_URL
env var. The schema can be found in db/schema.rb.
It uses redis-to-go, configured via REDISCLOUD_URL
env var. Redis backs the cache for the photography gallery.
It uses Heroku Scheduler add on to run two recurring jobs:
rails sitemap:refresh
rails cache_warmer:flickr
Cloudflare is used for DDoS protection, a basic cache, and CDN.
NOTE: Caching of .mp4 files is explicitly disabled in a custom page rule due to issues with Cloudflare changing HTTP 206 to 200, and causing Safari to not load .mp4 files. See this issue in Cloudflare forums for more information.
AWS Cloudfront creates a CDN distribution mirroring the website. The rails ASSET_HOST
env var is set to cause asset helper functions to use the Cloudfront host instead of the main domain.
Images are stored on AWS S3 by way of ActiveStorage in Rails. There are custom CDN routes defined, which allow for use of url helpers such as cdn_image_url
.
Sendgrid is used to send emails from the contact forms.
Cloudflare provides HTTPS via Let's Encrypt. The Rails application layer is configured to force an SSL connection.
The frontend of the site is built using Webpacker.
The technologies used are:
For observing performance data about the rails application.
For observing stderr and stdout logs emitted by the rails application.