start resty port to lapis
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
worker_processes ${{NUM_WORKERS}};
|
||||
error_log stderr notice;
|
||||
daemon off;
|
||||
pid logs/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
resolver 127.0.0.11;
|
||||
|
||||
init_by_lua_block {
|
||||
require("socket")
|
||||
require("lpeg")
|
||||
math.randomseed(os.time()+ngx.worker.id())
|
||||
}
|
||||
|
||||
server {
|
||||
listen ${{PORT}};
|
||||
lua_code_cache ${{CODE_CACHE}};
|
||||
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
|
||||
location /data/ {
|
||||
root /mnt;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
alias static/;
|
||||
}
|
||||
|
||||
location / {
|
||||
default_type text/html;
|
||||
content_by_lua_block {
|
||||
require("lapis").serve("app")
|
||||
}
|
||||
}
|
||||
|
||||
location /favicon.ico {
|
||||
alias static/favicon.ico;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user