-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathenv.example
242 lines (197 loc) · 9.73 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
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
########################################################################
# Environment configuration #
########################################################################
#
# Copy this file, edit to your liking, and save it as .env
#
# The only required environment variables are the ones that have "REQUIRED"
# just before them. They are also the only var definitions that are not
# commented-out.
#
# All other env variables have sensible defaults
#
# All environment variables begin with YB_
# So, to dump your current Yuebing env vars: `env | grep ^YB_ | sort`
#
# The most important things to configure here are:
# * admin user: email/password
# * storage: cloud vendor credentials & params
#
# Read more about configuration in docs/config.md
#####################################
# Destination storage #
#####################################
# This is where Yuebing will store its data: configuration, users, assets, etc.
# REQUIRED: the cloud storage type
# The value here can be s3, S3, b2 or B2
export YB_DEST_TYPE=s3
# REQUIRED: cloud "key" credential
# For s3: AWS Access Key for Yuebing system storage (s3)
# For b2: Key ID
export YB_DEST_KEY=your-AWS-access-key
# REQUIRED: cloud "secret" credential
# For s3: AWS Secret Key for Yuebing system storage (s3)
# For b2: Application Key
export YB_DEST_SECRET=your-AWS-secret-key
# REQUIRED: bucket name (S3) or bucket ID (B2)
# For S3, use the bucket name. For B2, use the bucket ID (not the name!)
export YB_DEST_BUCKET=please-do-kindly-replace-this-value-with-the-name-of-your-source-bucket
# For S3 only: the AWS region
#export YB_DEST_S3_REGION=us-east-1
# For B2 only: part size for large uploads, default is autodetect the `recommendedPartSize`
# See: https://www.backblaze.com/b2/docs/b2_authorize_account.html
#export YB_DEST_B2_PART_SIZE=10000000
# optional prefix, all writes to dest bucket will be under this prefix
# Do not end the prefix with a slash
#export YB_DEST_PREFIX=some/dest/path
#####################################
# Initial admin user #
#####################################
# REQUIRED: Initial admin email address
export [email protected]
# REQUIRED: Initial admin password
export YB_ADMIN_PASSWORD=
# Admin username
#export YB_ADMIN_USERNAME=admin
# admin locale
#export YB_ADMIN_LOCALE=en
# Overwrite the initial admin user even if it already exists
#export YB_ADMIN_OVERWRITE=true
#####################################
# Main site configuration #
#####################################
# Title of the site, shown in <title> tag and on homepage
#export YB_TITLE=Yuebing 🥮
# If this is true, anyone can browse and view media
# If this is false, you must be a logged-in user to browse or view media
#export YB_PUBLIC=false
# If this is true, visitors will be able to register for an account on the site
#export YB_ALLOW_REGISTRATION=false
# If this is true, logged-in users will see an "invite friends" feature in page footer
export YB_INVITE_FRIENDS_ENABLED=true
# If this is set, then YB_ALLOW_REGISTRATION is ignored
# If set, it specifies an object on the destination bucket containing a list of email addresses
# to allow registration from. The contents of this file can be a JSON array, or a flat text file
# with one email address per line
# Note that this path will still be relative to YB_DEST_PREFIX
#export YB_LIMIT_REGISTRATION=private/limitRegistration.json
# The default locale
#export YB_DEFAULT_LOCALE=en
# Base URL, outbound emails will point back here
#export YB_SITE_URL=http://127.0.0.1:3000/
# This environment variable is relative to the `static` directory and should not end in a slash
# See static/README.md for more info on setting a custom favicon
# If not set, default favicons are loaded from `static`
#export YB_FAVICON_DIR=some-dir
####################################
# Encryption and password hashing #
####################################
# If set, all stored data will be encrypted with this key
# Note: There will be a performance hit when using encrypted storage
# Generous cache thresholds can help
# To rotate the key, use the web admin "Migrate Data" functionality, or use mobiletto-cli to
# perform a mirror operation (Yuebing uses mobiletto as the underlying storage layer)
# Get mobiletto-cli here: https://www.npmjs.com/package/mobiletto-cli
#export YB_DATA_ENCRYPTION_KEY=some-random-key-$(date +%s)-$(cat /dev/urandom | head -1024 | shasum -a 256 | awk '{print $1}')
# IV and algorithm are optional
#export YB_DATA_ENCRYPTION_IV="a random IV, this is optional. If omitted an IV will be generated from the key"
#export YB_DATA_ENCRYPTION_ALGO=aes-256-cbc
# For password hashing
#export YB_BCRYPT_ROUNDS=12
#####################################
# Autoscan and Indexing #
#####################################
# Set to true to enable autoscan
# When autoscan is disabled, you can still manually scan sources from the web admin console
#export YB_AUTOSCAN_ENABLED=false
# Initial scan after startup, delay is in milliseconds
#export YB_AUTOSCAN_INITIAL_DELAY=60000
# How often to perform regular scans (milliseconds), usually daily is sufficient
#export YB_AUTOSCAN_INTERVAL=$(expr 1000 '*' 60 '*' 60 '*' 24)
# How many transformations can be done concurrently
# This setting is persisted, but can be overridden in the runtime environment
#export YB_AUTOSCAN_XFORM_CONCURRENCY=2
# How many indexes can be done concurrently
# This setting is not persisted, it can only be set in the runtime environment
#export YB_REINDEX_CONCURRENCY=2
#####################################
# Email #
#####################################
# Note: Email will only be enabled when YB_EMAIL_HOST is set
# If you're using Gmail as an SMTP server, you'll need an app-specific password
# See: https://support.google.com/mail/?p=InvalidSecondFactor
#export YB_EMAIL_HOST=smtp.example.com
#export YB_EMAIL_PORT=465
#export [email protected]
#export YB_EMAIL_PASSWORD=some-smtp-password
#export YB_EMAIL_SECURE=false
# Emails sent from this system will appear to come from this address
#export [email protected]
#####################################
# Redis and cache expirations #
#####################################
#export YB_REDIS_HOST=127.0.0.1
#export YB_REDIS_PORT=6379
#export YB_REDIS_FLUSH_AT_STARTUP=false
# Set to true to create the search index when yuebing starts
# You can rebuild the index on-demand using the web admin
#export YB_BUILD_SEARCH_INDEX_AT_STARTUP=false
# Expire user sessions after this many milliseconds
#export YB_SESSION_EXPIRATION=$(expr 1000 '*' 60 '*' 60 '*' 24 '*' 365 '*' 50)
# How long before tokens in account verification emails expire. Default is 2 days
#export YB_TIMEOUT_ACCOUNT_VERIFICATION=$(expr 1000 '*' 60 '*' 60 '*' 24 '*' 2)
# How long before tokens in reset-password emails expire. Default is 1 hour
#export YB_TIMEOUT_RESET_PASSWORD=$(expr 1000 '*' 60 '*' 60)
# Cache manifests, default 1 minute
#export YB_MANIFEST_CACHE_EXPIRATION=$(expr 60 '*' 1000)
#####################################
# Media Processing #
#####################################
# The YB_WORK_ settings are NOT saved in the persisted configuration, since they
# are system-dependent.
#
# These vars are initialized when Yuebing starts, from the environment (for Docker, the .env file)
# To change these you have to restart Yuebing with new YB_WORK_ settings
# YB_WORK_DIR is where temporary files are written
#
# When running in docker, this directory is bind-mounted on the host, NOT in the container
# Within the docker container, YB_WORK_DIR is always /usr/src/scratch
#
# The default is '/tmp/yuebing_workdir'
# If you'll be transforming a lot of files, change this!
# Ensure this directory is on a spacious volume.
#
# This directory should be OUTSIDE the yuebing source tree!
# Otherwise, it may get mapped into the image/container if you run in docker-dev mode
#export YB_WORK_DIR=/tmp/yuebing_workdir
# YB_WORK_MAX_LOAD is the maximum system load before jobs start delaying themselves
# Our job queue management has some issues where too many jobs get spawned
#
# This setting provides a ceiling to prevent the system from grinding to a stop
# The default value is 2 * (number of CPUs)
#export YB_WORK_MAX_LOAD=10
# When YB_WORK_SYS_REDIS_PORT is defined and Yuebing is running in a docker container, don't start redis inside
# the container; instead, connect to this host port from within the container. This will overwrite the
# YB_REDIS_PORT setting.
# When setting YB_WORK_SYS_REDIS_PORTm, also set YB_REDIS_HOST to the IP address of docker host as seen from
# your docker container (for example, 172.17.0.1)
#export YB_WORK_SYS_REDIS_PORT=6379
# When processing a very large media library, the upload step can take a long time
# Things you can do:
# Set YB_WORK_UPLOADS_CONCURRENCY to a larger number to process more uploads concurrently
# - If this is too high, you might get rate-limit errors from your cloud storage provider
# Set YB_WORK_UPLOADS_CONCURRENCY to zero, and uploads will be disabled. You can process
# all the media faster when you skip the upload step.
# Later, when all the media has been transformed, restart the app with YB_WORK_UPLOADS_CONCURRENCY
# set to a positive number and all the pending uploads will be processed
#export YB_WORK_UPLOADS_CONCURRENCY=2
#####################################
# Logging #
#####################################
# Yuebing uses winston for logging, using the `npm` log-level described here:
# https://www.npmjs.com/package/winston#logging-levels
#export YB_LOG_LEVEL=warn
# Write Yuebing server logs here. The default behavior is to log to console
# This only controls Yuebing's server-side logging
# Output from Nuxt and redis will still go to the console
#export YB_LOG_FILE=