Skip to content

luizalabs/nginx-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cc00ff2 · Jun 2, 2020

History

2 Commits
Jun 2, 2020
Jun 2, 2020
Jun 1, 2020
Jun 1, 2020
Jun 1, 2020

Repository files navigation

Nginx Docker Image with suporte to Lua Scripts

Also the decompress.lua scritp to decompress a gzipped request

How To Use

Dockerfile

FROM luizalabs/nginx-lua:0.0.1

# Add your nginx conf
COPY ./nginx.conf /etc/nginx/nginx.conf

CMD ["nginx"]

Nginx.conf

error_log /dev/stdout info;

events {
  worker_connections 1024;
}

http {
  server {
    server_name my-server;

    location / {
      proxy_pass http://my-server:8000;

      # to compress responses
      gzip on;
      gzip_types text/plain application/json;

      # to decompress requests to backend
      set $max_chunk_size 10240;
      set $max_body_size 524288;
      rewrite_by_lua_file /etc/lua/decompress.lua;
    }
  }
}

daemon off;

About

armazenar o Dockerfile da imagem de nginx

Resources

Stars

Watchers

Forks

Packages

No packages published