-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathnginx.conf
76 lines (64 loc) · 1.89 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
env HOSTNAME;
env SECONDARY_HOSTNAME;
env PORT;
env DATABASE_URL;
env DATABASE_USERNAME;
env DATABASE_PASSWORD;
env DATABASE_NAME;
env SESSION_SECRET_BASE;
env CODE_CACHE;
env DNS_RESOLVER;
env LOG_DIRECTIVE;
env MAIL_SMTP_USER;
env MAIL_SMTP_PASSWORD;
env MAIL_SMTP_SERVER;
env MAIL_SMTP_PORT;
env USE_DAEMON;
env WORKER_CONNECTIONS;
env DISCOURSE_SSO_SECRET;
env SENTRY_DSN;
env RELEASE_SHA;
env PROJECT_STORAGE_PATH;
env MAINTENANCE_MODE;
env STAT_ARGS;
worker_processes ${{NUM_WORKERS}};
error_log ${{LOG_DIRECTIVE}};
daemon ${{USE_DAEMON}};
pid tmp/nginx.pid;
events {
worker_connections ${{WORKER_CONNECTIONS}};
}
http {
lua_shared_dict session_cache 150m;
lua_shared_dict page_cache 512m;
lua_shared_dict query_cache 512m;
lua_shared_dict query_cache_categories 150m;
init_by_lua_block {
-- Include these two manually to prevent _G write guard warnings in logs
require "lpeg"
require "socket"
}
include nginx.conf.d/logging.conf;
include nginx.conf.d/mime.types;
resolver ${{DNS_RESOLVER}};
lua_code_cache ${{CODE_CACHE}};
client_body_buffer_size 10M;
client_max_body_size 10M;
# Just to keep the directory clean.
client_body_temp_path tmp/nginx_client_body_temp;
proxy_temp_path tmp/nginx_proxy_temp;
fastcgi_temp_path tmp/nginx_fastcgi_temp;
uwsgi_temp_path tmp/nginx_uwsgi_temp;
scgi_temp_path tmp/nginx_scgi_temp;
# We use a separate server block for each host to serve specific certs.
server {
server_name ${{HOSTNAME}} ${{SECONDARY_HOSTNAME}};
listen ${{PORT}} default_server;
# nginx amplify listen
listen 127.0.0.1:${{PORT}};
include nginx.conf.d/${{PRIMARY_NGINX_CONFIG}};
}
# development: this is simply empty, otherwise it contains SSL settings.
# do not include the `;`. It is included in config.lua
${{SECONDARY_NGINX_CONFIG}}
}