This file contains hidden or 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
| # config/unicorn.rb | |
| # Set the working application directory | |
| # working_directory '/path/to/your/app' | |
| working_directory '/var/www/demo-app' | |
| # Unicorn PID file location | |
| # pid '/path/to/pids/unicorn.pid' | |
| pid '/var/www/demo-app/pids/unicorn.pid' |
This file contains hidden or 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
| upstream app { | |
| # Path to Unicorn SOCK file, as defined previously | |
| server unix:/tmp/unicorn.demo-app.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name localhost; | |
| # Application root, as defined previously |
This file contains hidden or 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
| #!/bin/sh | |
| set -e | |
| # Example init script, this can be used with nginx, too, | |
| # since nginx and unicorn accept the same signals | |
| # Feel free to change any of the following variables for your app: | |
| TIMEOUT=${TIMEOUT-60} | |
| APP_ROOT=/var/www/demo-app | |
| PID=$APP_ROOT/var/www/demo-app/pids/unicorn.pid | |
| CMD="$APP_ROOT/bin/unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" |
This file contains hidden or 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
| class Attachment < ActiveRecord::Base | |
| belongs_to :document | |
| has_attached_file :attachment, | |
| :styles => { | |
| :thumb => ["250x250#", 'png'] | |
| }, | |
| :storage => :s3, | |
| :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", | |
| :path => "/:class/:attachment/:id/:token_document/:style/:filename" |
NewerOlder