Last active
May 24, 2024 18:08
-
-
Save wilyJ80/ae939885eaecee1ba53c22aea56abfa7 to your computer and use it in GitHub Desktop.
Lapis Nginx Config production notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes ${{NUM_WORKERS}}; | |
# Toggle in production | |
error_log stderr notice; | |
# Toggle in production | |
daemon off; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
init_by_lua_block { | |
require "lpeg" | |
} | |
server { | |
listen ${{PORT}}; | |
# Toggle in production | |
lua_code_cache ${{CODE_CACHE}}; | |
location / { | |
default_type text/html; | |
content_by_lua_block { | |
require("lapis").serve("app") | |
} | |
} | |
location /static/ { | |
alias static/; | |
} | |
location /favicon.ico { | |
alias static/favicon.ico; | |
} | |
} | |
} | |
# Read reference: https://leafo.net/lapis/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment