-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.example
166 lines (131 loc) · 6.28 KB
/
.env.example
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
# When adding new environment variables, make sure to update
# expectedEnvVariables in package.json if said variables should definitely be
# defined.
### GLOBAL VARIABLES ###
# If !false, Next's bundle(s) will be analyzed and report files generated
ANALYZE=false
# This will overwrite the NODE_ENV setting for the compiled application. This
# value is also used for inline replacements when building externals.
#
# Recognized values: test development production
# Default value: empty
NODE_ENV=
# The delete/hash of the imgur album used to store images uploaded via the API.
# An empty value is not allowed. See:
# https://apidocs.imgur.com/#c85c9dfc-7487-4de2-9ecd-66f727cf3139
IMGUR_ALBUM_HASH=xxx
# The client-id authorization token used to interact with the imgur API. An
# empty value is not allowed. See: https://api.imgur.com/#registerapp
IMGUR_CLIENT_ID=xxx
# MongoDB connect URI
# Specify auth credentials if necessary. An empty value is now allowed.
# MUST SPECIFY A DATABASE AT THE END! e.g. mongodb://.../your-database-here
MONGODB_URI=mongodb://127.0.0.1:27017/hscc-api-ghostmeme
# Dedicated port to be used by the MongoDB Memory Server during unit tests.
# Especially useful when stepping through code, since you can always access the
# db at `mongodb://127.0.0.1:MONGODB_MS_PORT/test` when the debugger is paused.
# Tip: call `jest.setTimeout()` with a large number (i.e. 10**6) to ensure the
# MongoClient topology isn't closed randomly leading to strange errors.
#
# Leave this blank to choose any random port (not recommended). Note: this
# option is also used when Node is started in debug mode, e.g. `node
# --inspect-brk` or `node --debug`.
MONGODB_MS_PORT=6666
# Controls which versions of the API will respond to requests. Examples (disable
# v1; disable v1 and v2; disable v3, v5, and v7):
# DISABLED_API_VERSIONS=1
# DISABLED_API_VERSIONS=1,2
# DISABLED_API_VERSIONS=3,5,7
#
# Note that `DISABLED_API_VERSIONS=` (i.e. empty) means no
# versions are disabled!
DISABLED_API_VERSIONS=
# Determines the number of items returned by paginated endpoints
RESULTS_PER_PAGE=100
# If !false, all rate limits and exponential soft banning will be ignored
IGNORE_RATE_LIMITS=false
# If !false, no one will be able to use the API
LOCKOUT_ALL_KEYS=false
# Controls what request methods are allowed. Empty means all are allowed
# (default).
#
# Example, to make API read-only:
# DISALLOWED_METHODS=POST,PUT
DISALLOWED_METHODS=
# Every Nth request will be be cancelled and an HTTP 555 response returned. Set
# to 0 to disable
REQUESTS_PER_CONTRIVED_ERROR=10
# Maximum allowed size of a request body and Content-Length header in bytes.
# Should be a string like 1kb, 1mb, 500b
MAX_CONTENT_LENGTH_BYTES=10mb
# Optional environment variable that, if !false, instructs the app to DESTROY
# the contents of the current database and replace it with dummy data when a
# client visits the index page. This will only work when NODE_ENV=development to
# protect against accidental use.
HYDRATE_DB_ON_STARTUP=false
### EXTERNAL SCRIPT VARIABLES ###
# (optional unless using the relevant external script)
# MongoDB connect URI optionally used by all external scripts. Specify auth
# credentials if necessary. Defaults to MONGODB_URI if left empty.
# MUST SPECIFY A DATABASE AT THE END! e.g. mongodb://.../your-database-here
EXTERNAL_SCRIPTS_MONGODB_URI=
# How often this script is going to be invoked. This doesn't determine anything
# automatically on its own, this is useful to ensure the script works no matter
# how often you decide to call it.
BAN_HAMMER_WILL_BE_CALLED_EVERY_SECONDS=60
# The maximum number of requests per BAN_HAMMER_RESOLUTION_WINDOW_SECONDS
# allowed by a single client.
BAN_HAMMER_MAX_REQUESTS_PER_WINDOW=10
# How far back into the past this script looks when checking a key or ip against
# BAN_HAMMER_MAX_REQUESTS_PER_WINDOW.
BAN_HAMMER_RESOLUTION_WINDOW_SECONDS=1
# The initial amount of time an offender is banned.
BAN_HAMMER_DEFAULT_BAN_TIME_MINUTES=15
# When an offender is banned twice in the same "period," they're banned for
# BAN_HAMMER_DEFAULT_BAN_TIME_MINUTES * BAN_HAMMER_RECIDIVISM_PUNISH_MULTIPLIER
# minutes instead of the default. This is also the length of the "period".
BAN_HAMMER_RECIDIVISM_PUNISH_MULTIPLIER=4
# The size of the request-log collection will not be allowed to exceed this
# amount. Oldest entries are deleted first.
PRUNE_DATA_MAX_LOGS=100000
# The size of the limited-log-mview collection will not be allowed to exceed
# this amount. Oldest entries are deleted first.
PRUNE_DATA_MAX_BANNED=100000
# The size of the users collection will not be allowed to exceed this
# amount. Oldest entries are deleted first.
PRUNE_DATA_MAX_USERS=3400
# The size of the memes collection will not be allowed to exceed this
# amount. Oldest entries are deleted first.
PRUNE_DATA_MAX_MEMES=35540
# The size of the uploads collection will not be allowed to exceed this
# amount. Oldest entries are deleted first.
PRUNE_DATA_MAX_UPLOADS=10000
# The number of users created when initializing the database.
INIT_DATA_USERS=100
# The number of memes created per-user when initializing the database. This
# includes some combination of story memes and public memes but does not include
# chats or comments.
INIT_DATA_USER_MEMES=10
# The maximum number of friends generated users will immediately add, bypassing
# the "request" phase. A user can end up with dramatically more friends than
# this number!
#
# Additionally, the following relation must hold: INIT_DATA_USER_MAX_FRIENDS +
# INIT_DATA_USER_MAX_REQUESTS < INIT_DATA_USERS
INIT_DATA_USER_MAX_FRIENDS=3
# The maximum number of outgoing friend requests generated users will have.
#
# Additionally, the following relation must hold:
# INIT_DATA_USER_MAX_FRIENDS + INIT_DATA_USER_MAX_REQUESTS < INIT_DATA_USERS
INIT_DATA_USER_MAX_REQUESTS=5
# The maximum number of chat threads a generated user will _initiate_. A user
# can end up having dramatically more chats than this number!
INIT_DATA_USER_MAX_CHATS=1
# The maximum number of friend's stories under which a generated user will
# _initiate_ a comment thread. A user can end up being involved in dramatically
# more comment threads than this number!
INIT_DATA_USER_MAX_COMMENTS=3
# The span of time over which generated events will have "elapsed".
INIT_DATA_START_MINS_AGO=60
### TOOLS FRONTEND VARIABLES ###
# (optional unless using tools)