This file contains 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 'config' | |
branch = `git rev-parse --abbrev-ref HEAD`.strip rescue nil | |
use_single_db = !Settings.db_per_branch || !branch || branch == 'master' | |
branch_spec = (use_single_db ? "" : "_#{branch}").underscore.gsub(/[\.\/\-]/, '_') | |
%> | |
development: | |
<<: *default | |
database: app_development<%= branch_spec %> |
- Install nginx
brew install nginx
- Cd into the nginx directory
/usr/local/etc/nginx
- Create a
ssl
directory, change and generate a dummy ssl cert:mkdir ssl
cd ssl
penssl req -new -newkey rsa:2048 -sha1 -days 365 -nodes -x509 -keyout server.key -out server.crt
(just accept the default empty settings) - Go back to the nginx directory
cd ..
- Create or edit nginx.conf with the following settings:
events {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
resources :media, shallow: true, | |
constraints: ->(req) do | |
current_user = req.env["warden"].user(:user) | |
Flipper.enabled?(:media_uploads, current_user) | |
end |