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
| # frozen_string_literal: true | |
| max_threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 } | |
| min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count } | |
| threads min_threads_count, max_threads_count | |
| port ENV.fetch('PORT') { 3000 } | |
| environment ENV.fetch('RAILS_ENV') { 'staging' } |
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 staging_backend { | |
| server unix:///home/ubuntu/<SOMETHING>/shared/tmp/sockets/puma.sock fail_timeout=0; | |
| } | |
| # no server_name, routes to default this default server directive | |
| server { | |
| listen 80; | |
| client_max_body_size 10m; | |
| location / { |
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
| { | |
| "Version": "2008-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "AllowPublicRead", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "*" | |
| }, | |
| "Action": "s3:GetObject", |
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
| Typical setup |
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
| Typical setup process of a React project on Node |
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
| server { | |
| listen 443 ssl; | |
| server_name domain.com; | |
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | |
| ssl_certificate /etc/ssl/certs/domain.crt; | |
| ssl_certificate_key /etc/ssl/certs/domain.key; | |
| ssl on; |
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
| JS_PATH = 'app/assets/javascripts/**/*.js' | |
| Dir[JS_PATH].each do |file| | |
| begin | |
| Uglifier.compile(File.read(file)) | |
| rescue => e | |
| puts e.message | |
| puts file | |
| end | |
| end |
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
| # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file | |
| # | |
| # To ban all spiders from the entire site uncomment the next two lines: | |
| User-agent: libwww-perl | |
| User-agent: Rogerbot | |
| User-agent: Exabot | |
| User-agent: MJ12bot | |
| User-agent: Dotbot | |
| User-agent: Gigabot | |
| User-agent: AhrefsBot |
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
| # /etc/logrotate.d/<logrotate_file> | |
| /home/ubuntu/<folder>/shared/log/*.log { | |
| daily | |
| missingok | |
| rotate 1 | |
| compress | |
| notifempty | |
| copytruncate | |
| su ubuntu ubuntu | |
| } |
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
| module PageFunctions | |
| include Capybara::DSL | |
| def in_browser(name) | |
| old_session = Capybara.session_name | |
| Capybara.session_name = name | |
| yield | |
| Capybara.session_name = old_session |
NewerOlder