Skip to content

Instantly share code, notes, and snippets.

@siteslave
Created January 30, 2023 06:24
Show Gist options
  • Save siteslave/3efb1fead962919769c51ac73ed33990 to your computer and use it in GitHub Desktop.
Save siteslave/3efb1fead962919769c51ac73ed33990 to your computer and use it in GitHub Desktop.

Dockerfile:

FROM nginx:alpine

COPY nginx.training.conf /etc/nginx/nginx.conf

COPY web /usr/share/nginx/html

EXPOSE 8888

nginx.training.conf:

error_log                       /var/log/nginx/error.log warn;

events {
    worker_connections          1024;
}

http {
  include                     /etc/nginx/mime.types;
  default_type                application/octet-stream;
  sendfile                    on;
  access_log                  /var/log/nginx/access.log;
  keepalive_timeout           300000;
  types_hash_max_size         300000;
  proxy_connect_timeout       300000;
  proxy_send_timeout          300000;
  proxy_read_timeout          300000;
  send_timeout                300000;
  server {
    listen                  8888;
    index                   index.html index.htm;
    server_name             localhost;
    client_max_body_size    320m;
    error_page              500 502 503 504  /50x.html;
    location = /50x.html {
          root              /var/lib/nginx/html;
    }
      
    location / {
        root /usr/share/nginx/html;
        index index.html;
    }

  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment