-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_static_hosting.cfg
194 lines (167 loc) · 6.13 KB
/
nginx_static_hosting.cfg
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[buildout]
extends =
logrotate.cfg
supervisor.cfg
nginx.cfg
parts +=
logrotate
logrotate-conf
logrotate-cron
supervisor
nginx-conf
npm
client-site-package-conf
client-site-package
downpage-connect-nginx
downpage-generic-nginx
downpage-janux-nginx
downpage-okstate-nginx
downpage-spurstartup-nginx
# We manage our checkouts using mr.developer, which
# easily allows pinning versions (revision=XXX)
# and provides the 'develop' command with many
# useful actions (like 'rebuild)
# See https://pypi.python.org/pypi/mr.developer/
extensions = mr.developer
mr.developer-threads = 35
sources-dir = sources
auto-checkout = *
[sources]
z3c.recipe.filetemplate = git https://github.com/NextThought/z3c.recipe.filetemplate.git
[nginx-conf]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = nginx.conf static_hosting.conf
# Whether nginx should daemonize. Set it to
# off if you will be controlling it with
# supervisor, on if system will control it
nginx_daemon = off
aio = aio on;
# Copy these things in from the environment; eventually
# they should move directly here; the extends keyword is a
# bad idea if there are many unrelated settings
nginx_host_name = downloads.nextthought.com
nginx_root = /srv/static_hosting/hosting_root/
nginx_user = ntistatichosting
nginx_workers = 9
nginx_ip = 0.0.0.0
nginx_proxy_port = 8081
nginx_http_port = 8080
nginx_extra_binds =
listen ${:nginx_http_port};
# How many files to keep in the open cache. This should be
# at least 60K in production (smaller in dev where ulimits
# are usually not set up)
nginx_max_open_files = 60000
# Block to allow addition nginx configuration is special scenarios
nginx_extra_server_config = #
[nginx-conf:macosx]
# AIO is not even a directive on osx
aio =
[npm]
recipe = gp.recipe.node
version = 6.1.0
npms = npm
[downpage-generic-nginx]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = generic-downpage.conf
global_host_name = columbia.nextthought.com columbia-alpha.nextthought.com columbia-test.nextthought.com litworld.nextthought.com litworld-alpha.nextthought.com litworld-test.nextthought.com mathcounts.nextthought.com mathcounts-alpha.nextthought.com mathcounts-test.nextthought.com prmia.nextthought.com prmia-alpha.nextthought.com prmia-test.nextthought.com oc.nextthought.com oc-alpha.nextthought.com oc-test.nextthought.com lab.symmys.com symmys.nextthought.com symmys-alpha.nextthought.com symmys-test.nextthought.com
root_path = /srv/static_hosting/downpages/generic
global_content_location = /content/
webapp_location = /app/
loginapp_location = /login/
[downpage-connect-nginx]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = connect-downpage.conf
global_host_name = connect.nextthought.com connect-alpha.nextthought.com connect-test.nextthought.com
root_path = ${buildout:root-directory}/node_modules/nti-content-landingpage-connect/dist
global_content_location = /content/
webapp_location = /app/
loginapp_location = /login/
[downpage-janux-nginx]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = janux-downpage.conf
global_host_name = janux.ou.edu platform.ou.edu ou-alpha.nextthought.com ou-test.nextthought.com
root_path = /srv/static_hosting/downpages/janux
global_content_location = /content/
webapp_location = /app/
loginapp_location = /login/
[downpage-okstate-nginx]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = okstate-downpage.conf
global_host_name = learnonline.okstate.edu okstate.nextthought.com okstate-test.nextthought.com okstate-alpha.nextthought.com
root_path = ${buildout:root-directory}/node_modules/nti-content-landingpage-okstate/dist
global_content_location = /content/
webapp_location = /app/
loginapp_location = /login/
[downpage-spurstartup-nginx]
recipe = z3c.recipe.filetemplate
source-directory = templates
dest-directory = ${deployment:root-directory}
# the main conf file is already installed
# as part of building nginx, we must overwrite it
force-overwrite = true
files = spurstartup-downpage.conf
global_host_name = spurstartup.nextthought.com spurstartup-alpha.nextthought.com spurstartup-test.nextthought.com
root_path = ${buildout:root-directory}/node_modules/nti-content-landingpage-spurstartup/dist
global_content_location = /content/
webapp_location = /app/
loginapp_location = /login/
[client-site-package-conf]
recipe = nti.recipes.json
output-file = ${buildout:directory}/package.json
contents-section = client-site-package-conf-main
[client-site-package-conf-main]
name = nti-buildout-downpage
version = 0.0.1
description = NextThought Buildout Downpage NodeJS Library
author = NextThought
private = true
dependencies-section = client-site-package-conf-deps
[client-site-package-conf-deps]
nti-content-landingpage-connect = ^1.0
nti-content-landingpage-okstate = ^1.0
nti-content-landingpage-spurstartup = ^0.0
[client-site-package]
recipe = collective.recipe.cmd
on_install = true
on_update = true
site-asset-package = ${buildout:root-directory}
cmds =
pushd ${:site-asset-package}
${buildout:root-directory}/bin/npm install
${buildout:root-directory}/bin/npm update
popd
[supervisor]
# Disable supervisord based log rotation because we have switched to using logrotate
logfile-maxbytes = 0
childstdout-logfile-maxbytes = 0
childstderr-logfile-maxbytes = 0
# Don't wipe away existing logs
nocleanup = True
programs =
1 nginx ${deployment:bin-directory}/nginx