-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsupervisord.conf
95 lines (91 loc) · 3.02 KB
/
supervisord.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[supervisord]
nodaemon = true
[program:nginx]
command = /nginx.sh
# scrub potentially sensitive environment variables we don't need
environment = AWS_ACCESS_KEY_ID="",
AWS_SECRET_ACCESS_KEY="",
DM_ADMIN_USER_IPS="",
DM_ANTIVIRUS_API_AUTH_TOKENS="",
DM_ANTIVIRUS_API_CALLBACK_AUTH_TOKENS="",
DM_API_AUTH_TOKENS="",
DM_API_CALLBACK_AUTH_TOKENS="",
DM_APP_AUTH="",
DM_DATA_API_AUTH_TOKEN="",
DM_DEV_USER_IPS="",
DM_DNB_API_PASSWORD="",
DM_MAILCHIMP_API_KEY="",
DM_MANDRILL_API_KEY="",
DM_NOTIFY_API_KEY="",
DM_SEARCH_API_AUTH_TOKEN="",
DM_SEARCH_API_AUTH_TOKENS="",
DM_USER_IPS="",
SECRET_KEY="",
SHARED_EMAIL_KEY="",
autostart = true
autorestart = true
stdout_logfile = /var/log/digitalmarketplace/nginx_access.log
stdout_logfile_maxbytes = 50000000
stdout_logfile_backups = 3
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes = 0
stopsignal = STOP
# bosh will probably kill everything after 10s - stop a second early in the hopes that the logs of our
# last handled request make it off the machine
stopwaitsecs = 9
[program:uwsgi]
command = uwsgi --ini /etc/uwsgi.conf --master
directory = /app
autostart = true
autorestart = true
stdout_logfile = /var/log/digitalmarketplace/application.log
stdout_logfile_maxbytes = 50000000
stdout_logfile_backups = 3
stdout_events_enabled = true
stderr_events_enabled = true
redirect_stderr = true
# USR1 doesn't actually stop uwsgi at all - it prints statistics (!), but we want to hang on as long
# as possible after bosh asks us to shut down to give us a chance to handle as much of the potential
# connection backlog we might have.
stopsignal = USR1
# bosh will probably kill everything after 10s - stop a second early in the hopes that the logs of our
# last handled request make it off the machine
stopwaitsecs = 9
[eventlistener:forward_uwsgi_logs_to_stdout]
command = supervisor_stdout
buffersize = 1000
events = PROCESS_LOG
result_handler = supervisor_stdout:event_handler
[program:awslogs]
command = /awslogs.sh
# scrub potentially sensitive environment variables we don't need
environment = DM_ADMIN_USER_IPS="",
DM_ANTIVIRUS_API_AUTH_TOKENS="",
DM_ANTIVIRUS_API_CALLBACK_AUTH_TOKENS="",
DM_API_AUTH_TOKENS="",
DM_API_CALLBACK_AUTH_TOKENS="",
DM_APP_AUTH="",
DM_DATA_API_AUTH_TOKEN="",
DM_DEV_USER_IPS="",
DM_DNB_API_PASSWORD="",
DM_MAILCHIMP_API_KEY="",
DM_MANDRILL_API_KEY="",
DM_NOTIFY_API_KEY="",
DM_SEARCH_API_AUTH_TOKEN="",
DM_SEARCH_API_AUTH_TOKENS="",
DM_USER_IPS="",
PROXY_AUTH_CREDENTIALS="",
SECRET_KEY="",
SHARED_EMAIL_KEY="",
autostart = true
autorestart = true
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes = 0
stderr_logfile = /var/log/awslogs.log
stderr_logfile_maxbytes = 5000000
stderr_logfile_backups = 3
# we want awslogs to keep running when everything else is shutting down so we don't miss logs
# but supervisord has no option to disable the stopsignal, so we send it HUP but run it under nohup
stopsignal = HUP
# bosh will probably kill us after 10s
stopwaitsecs = 15