forked from snap-cloud/snapCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
64 lines (54 loc) · 1.59 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
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 ROLLBAR_TOKEN;
env PROJECT_STORAGE_PATH;
env MAINTENANCE_MODE;
worker_processes ${{NUM_WORKERS}};
error_log ${{LOG_DIRECTIVE}};
daemon ${{USE_DAEMON}};
pid logs/nginx.pid;
events {
worker_connections ${{WORKER_CONNECTIONS}};
}
http {
include nginx.conf.d/logging.conf;
include nginx.conf.d/mime.types;
lua_shared_dict page_cache 15m;
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 logs/nginx_client_body_temp;
proxy_temp_path logs/nginx_proxy_temp;
fastcgi_temp_path logs/nginx_fastcgi_temp;
uwsgi_temp_path logs/nginx_uwsgi_temp;
scgi_temp_path logs/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}}
}