Sha256: 935a233fd4714964e54067845af8950c77cda8454e6697f2ec6b87e38f90257e

Contents?: true

Size: 975 Bytes

Versions: 36

Compression:

Stored size: 975 Bytes

Contents

# configure nginx
RUN gem install foreman && \
<% unless run_as_root? -%>
    sed -i 's|pid /run|pid /rails/tmp/pids|' /etc/nginx/nginx.conf && \
<% end -%>
    sed -i 's/access_log\s.*;/access_log <% unless run_as_root? %>\/dev\/<% end %>stdout;/' /etc/nginx/nginx.conf && \
    sed -i 's/error_log\s.*;/error_log <% unless run_as_root? %>\/dev\/<% end %>stderr info;/' /etc/nginx/nginx.conf

COPY <<-"EOF" /etc/nginx/sites-available/default
server {
  listen 3000 default_server;
  listen [::]:3000 default_server;
  access_log <% unless run_as_root? %>/dev/<% end %>stdout;

  root /rails/public;

  location /cable {
    proxy_pass http://localhost:8082/cable;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
  }

  location / {
    try_files $uri @backend;
  }

  location @backend {
    proxy_pass http://localhost:3001;
    proxy_set_header Host $http_host;
  }
}
EOF

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
dockerfile-rails-1.7.2 lib/generators/templates/_nginx.erb
dockerfile-rails-1.7.1 lib/generators/templates/_nginx.erb
dockerfile-rails-1.7.0 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.25 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.24 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.23 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.22 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.21 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.20 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.19 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.18 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.17 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.16 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.15 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.10 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.9 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.8 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.7 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.6 lib/generators/templates/_nginx.erb
dockerfile-rails-1.6.5 lib/generators/templates/_nginx.erb