forked from Joystream/orion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env
169 lines (140 loc) · 6.61 KB
/
.env
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
# Db config
DB_NAME=squid
DB_PASS=squid
DB_PORT=5432
DB_ADMIN_USER=admin
DB_ADMIN_PASS=admin
# ==================================================================================
# ============================= ARCHIVE CONFIGURATION ==============================
# ==================================================================================
# postgres database port used by the archive
ARCHIVE_DB_PORT=12345
# Port that is used by the processor to fetch batches of block
GATEWAY_PORT=8000
# alternatively you can point to your own joystream rpc node if you have one
WS_SOURCE=wss://rpc.joystream.org:9944
# port exposed by the explorer
EXPLORER_PORT=4444
# Archive gateway endpoint
ARCHIVE_GATEWAY_URL=http://orion_archive_gateway:${GATEWAY_PORT}/graphql
# Orion services ports
GRAPHQL_API_PORT=4350
AUTH_API_PORT=4074
PROCESSOR_PROMETHEUS_PORT=3337
# Express.js "trust proxy" setting
# It specifies which IP addresses are considered "trusted" to provide
# correct values in the `X-Forwarded-For` header (to avoid ip spoofing).
# `uniquelocal` means all local network addresses are trusted, ie:
# 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7
# When using the default docker-compose setup, this is the recommended setting.
# To read more about the `trust proxy` setting, see:
# https://expressjs.com/en/guide/behind-proxies.html
TRUST_PROXY=uniquelocal
# Enable/disable Auth API playground
OPENAPI_PLAYGROUND=true
# DEVELOPMENT SETTINGS:
# WARNING: DO NOT USE THESE SETTINGS IN PRODUCTION!
ORION_ENV=development
DEV_DISABLE_SAME_SITE=true
# PRODUCTION SETTINGS:
# A root domain of your Gateway, that will be used for setting the session cookie
# and CORS headers. For example, if you are serving the GraphQL API and Auth API
# under subdomains like `query.mygateway.com` and `auth.mygateway.com` and the Atlas
# frontend directly under `mygateway.com`, you should set this value to `mygateway.com`.
# ORION_ENV=production
# GATEWAY_ROOT_DOMAIN=<YOUR GATEWAY ROOT DOMAIN>
# ==================================================================================
# ========================= INITIAL GATEWAY CONFIGURATION ==========================
# ==================================================================================
# The name of Your gateway (pick a unique one!)
APP_NAME=<YOUR GATEWAY NAME>
# Whether videos with no category assigned should be visible on the gateway
SUPPORT_NO_CATEGORY_VIDEOS=<true/false>
# Whether the gateway should support all newly created video categories
# by default.
SUPPORT_NEW_CATEGORIES=<true/false>
# Default value of the "kill switch". If set to true, it will force the
# Atlas to start in a "maintenance mode", before the value of the kill
# switch is changed via the operator API.
KILL_SWITCH_ON=<true/false>
# The number of seconds that need to pass before a video view from the
# same user is counted again.
VIDEO_VIEW_PER_USER_TIME_LIMIT=300
# A secret string that will be used when authenticating as a Gateway operator.
# It's recommended to generate a random string of at least 16 characters.
# For example: `openssl rand -base64 18`
OPERATOR_SECRET=<SECURELY RANDOM SECRET>
# Weights used for calclating the relevance score of a video.
# The relevance score affects the order in which videos are displayed
# on the homepage of Atlas.
# The first value is the "newness_weight",
# The second value is the "views_weight",
# The third value is the "comments_weight",
# The fourth value is the "reactions_weight".
# The fifth value is a list of two values:
# - joystreamCreationWeight: how much Video.createdAt date affects the `newness` score
# - ytCreationWeight: how much Video.publishedBeforeJoystream affects the `newness` score
# The sixth value is the "channel_weight".
# The relevance score is calculated as follows:
# ```
# (
# newness * newness_weight +
# views * views_weight +
# comments * comments_weight +
# reactions * reactions_weight
# ) * channel_weight
# ```
# Where newness is:
# ```
# -(
# (days since Video.createdAt * joystreamCreationWeight) +
# (days since Video.publishedBeforeJoystream * ytCreationWeight)
# ) / (joystreamCreationWeight + ytCreationWeight)
# ```
RELEVANCE_WEIGHTS="[1, 0.03, 0.3, 0.5, [7,3], 1]"
# After how many new video views, the relevance score of a video should
# be recalculated.
VIDEO_RELEVANCE_VIEWS_TICK=10
# Maximum number of entities that can be cached in Orion processor's memory.
# If the Orion processor service is running out of memory, try decreasing
# this value.
MAX_CACHED_ENTITIES=1000
# A secret string used to generate a private key for signing the attestation
# that certain channels and videos were created throguh Your gateway.
# It's recommended to generate a random string of at least 16 characters.
# For example: `openssl rand -base64 18`
APP_PRIVATE_KEY=<SECURELY RANDOM SECRET>
# After how many minutes does the session expire in case of user inactivity.
# Once the session expires, the user will need to re-authenticate.
SESSION_EXPIRY_AFTER_INACTIVITY_MINUTES=60
# After how many hours does the session expire regardless of user activity.
SESSION_MAX_DURATION_HOURS=720
# The route in Atlas used for the purpose of user e-mail confirmation.
# CURRENTLY NOT USED
EMAIL_CONFIRMATION_ROUTE=NOT_USED
# The number of hours after which the e-mail confirmation link expires.
EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS=24
# How many e-mail confirmation links can be sent to a user within
# `EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS` (to prevent spamming)
EMAIL_CONFIRMATION_TOKEN_RATE_LIMIT=5
# How many seconds have to pass since the timestamp included in a signed message
# that proves the ownership of a Joystream account/address, before the message
# is considered expired.
ACCOUNT_OWNERSHIP_PROOF_EXPIRY_TIME_SECONDS=300 # 5 minutes
# A secret string used to generate a private key for the purpose of signing cookies,
# to ensure that the cookies sent by the client application (like Atlas) have been
# indeed set by your instance of Orion and have not been tampered with.
# It's recommended to generate a random string of at least 16 characters.
# For example: `openssl rand -base64 18`
COOKIE_SECRET=<SECURELY RANDOM SECRET>
# max number of attempts to deliver email notification
EMAIL_NOTIFICATION_DELIVERY_MAX_ATTEMPTS=5
# Sendgrid API
# Sendgrid configuration of api key and email address used to send transactional mails from
SENDGRID_API_KEY=<SENDGRID API KEY>
SENDGRID_FROM_EMAIL=<NO-REPLY EMAIL ADDRESS>
# Notification emails storage links
# Online path which contains the icons and logo to display in the notification e-mails
APP_ASSET_STORAGE=<LINK_TO_STORAGE_ASSETS>
# Name of the application link displayed in the notification e-mail footer
APP_NAME_ALT=<ALTERNATIVE_APP_NAME>