-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.cson
114 lines (113 loc) · 5.58 KB
/
schema.cson
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
type: "object"
additionalProperties: false
properties:
servers: # Servers are things that run forever, listening on ports
type: "array"
required: false
items:
type: 'object'
additionalProperties: false
properties:
cd: { type: "string", required: false } # this server's working directory
env: { type: "object", required: false } # any custom/static environment variables you want to pass to every instance
port: { type: "number", required: false } # the starting port to listen on (see: count)
count: { type: "number", required: false } # launch duplicates, incrementing 'port' for each new one.
prefix: { type: "string", required: false } # prepend this to each line from stdout
command: { type: "string", required: true } # the full shell command to execute (e.g. "node app.js")
poolName: { type: "string", required: false } # re: nginx, put this block of servers in it's own pool
portVariable: { type: "string", required: false } # the environment variable to use to configure the port (e.g. "PORT")
restart: { # What to do when restarting a single process.
type: "object"
required: false
additionalProperties: false
properties:
maxAttempts: { type: "number", required: false } # How many failed start attempts before we give up.
maxInterval: { type: "number", required: false } # maxAttempts must be reached within this much time for it to truly fail.
timeout: { type: "number", required: false } # How long to wait for the server to start listening on it's assigned port.
gracePeriod: { type: "number", required: false } # How long to wait between shutdown and startup.
}
git: { # How/where to fetch code
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
cd: { type: "string", required: false } # the root directory for the repository of interest
remote: { type: "string", required: false } # used by git.command
branch: { type: "string", required: false } # used by git.command
command: { type: "string", required: false } # e.g. "git pull {{remote}} {{branch}}
before: { type: "string", required: false } # A command to run before doing the pull/merge.
after: { type: "string", required: false } # A command to run after doing the pull/merge.
}
check: { # Specifies how to run a health-check request against this server.
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
url: { type: "string", required: false } # The exact http[s] url to request.
status: { type: "number", required: false } # The status to expect.
contains: { type: "any", required: false } # Text that should be contained in the response, can be null, a string, or a regex.
timeout: { type: "number", required: false } # How long to wait before considering it a failure.
interval: { type: "number", required: false } # How often to check.
}
workers: # Workers are just processes, that don't listen on ports.
type: "array"
required: false
items:
type: 'object'
additionalProperties: false
properties:
cd: { type: "string", required: false } # The working directory of the worker.
command: { type: "string", required: true } # The command to start a new worker.
count: { type: "number", required: false } # How many duplicate workers to keep running.
prefix: { type: "string", required: false } # Prepend this to all lines from the worker's stdout.
env: { type: "object", required: false } # Custom environment variables to pass to the worker.
rabbitmq:
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
url: { type: "string", required: false, format: "uri" } # The full url to connect to a RabbitMQ instance.
channel: { type: "string", required: false } # Which channel to use for messaging.
nginx:
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
config: { type: "string", required: true } # The path of the config file to generate (must be a full path to a writable file).
reload: { type: "string", required: false } # The command to use to cause nginx to reload the generated configuration.
template: { type: "any", required: false } # A template for generating the upstream configuration files.
loggly:
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
token: { type: "string", required: true }
subdomain: { type: "string", required: true }
tags: {
type: "array"
required: false
minItems: 0
items: { type: "string" }
}
json: { type: "boolean", required: false }
mongodb:
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false }
url: { type: "string", required: true } # The full url to connect to a MongoDB instance (including database).
collection: { type: "string", required: true }
size: { type: "number", required: true }
admin:
type: "object"
required: false
additionalProperties: false
properties:
enabled: { type: "boolean", required: false } # WARN: Currently ignored. Disabling the admin does nothing.
port: { type: "number", required: false } # Which port should the console/admin be made available at.