Sha256: 4e056c98853d7ed256280042016fcd86dd6b8cbd19c98e1441cb361542fda860
Contents?: true
Size: 1 KB
Versions: 36
Compression:
Stored size: 1 KB
Contents
# configure nginx and passenger COPY <<-'EOF' /etc/nginx/sites-enabled/default server { listen 3000; root /rails/public; passenger_enabled on; <% if options['max-idle'] -%> passenger_ctl hook_detached_process /etc/nginx/hook_detached_process; passenger_min_instances 0; passenger_pool_idle_time <%= max_idle %>; <% end -%> } EOF <% if options['max-idle'] -%> COPY <<-'EOF' /etc/nginx/sites-enabled/hook_detached_process #!/usr/bin/env ruby status = `passenger-status` processes = status[/^Processes\s*:\s*(\d*)/, 1].to_i system 'nginx -s stop' if processes == 0 EOF <% end -%> RUN echo "daemon off;" >> /etc/nginx/nginx.conf && \ sed -i 's/access_log\s.*;/access_log stdout;/' /etc/nginx/nginx.conf && \ sed -i 's/error_log\s.*;/error_log stderr info;/' /etc/nginx/nginx.conf && \ <% if options['max-idle'] -%> chmod +sx /etc/nginx/sites-enabled/hook_detached_process && \ <% end -%> sed -i 's/user www-data/user rails/' /etc/nginx/nginx.conf && \ mkdir /var/run/passenger-instreg
Version data entries
36 entries across 36 versions & 1 rubygems