Skip to content

Commit 0a25c54

Browse files
committed
Update .env (Joystream#372)
1 parent f7ad779 commit 0a25c54

3 files changed

Lines changed: 188 additions & 275 deletions

File tree

.env

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ EMAIL_NOTIFICATION_DELIVERY_MAX_ATTEMPTS=5
7373

7474
# Notification emails storage links
7575
APP_ASSET_STORAGE=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/logos/gleev
76+
77+
# Name of the application link displayed in the notification e-mail footer
7678
APP_NAME_ALT=Gleev.xyz
79+
80+
# Set URL where the notification icons are stored.
7781
NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/icons
7882

7983
# =====================================================================================
@@ -83,3 +87,12 @@ NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notifi
8387
# yes/no
8488
TELEMETRY_ENABLED=no
8589
TELEMETRY_ENDPOINT=http://apm-server:8200
90+
91+
# every time a channel is followed / unfollowed, its weight will be recalculated
92+
CHANNEL_WEIGHT_FOLLOWS_TICK=1
93+
94+
# set the minimum amounts of JOY tokens required to obtain each tier
95+
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'
96+
97+
# set the volume threshold below which tokens are considered to have no market cap
98+
CRT_MARKET_CAP_MIN_VOLUME_JOY=100

docs/operator-guide/examples/.env

Lines changed: 76 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,98 @@
1+
# LOCAL DEV ENVIRONMENT
2+
ORION_ENV=development
3+
DEV_DISABLE_SAME_SITE=true
4+
15
# Db config
26
DB_NAME=squid
37
DB_PASS=squid
4-
DB_PORT=5432
5-
68
DB_ADMIN_USER=admin
79
DB_ADMIN_PASS=admin
8-
9-
# ==================================================================================
10-
# ============================= ARCHIVE CONFIGURATION ==============================
11-
# ==================================================================================
12-
# postgres database port used by the archive
13-
ARCHIVE_DB_PORT=12345
14-
# Port that is used by the processor to fetch batches of block
15-
GATEWAY_PORT=8000
16-
# alternatively you can point to your own joystream rpc node if you have one
17-
WS_SOURCE=wss://rpc.joystream.org:9944
18-
# port exposed by the explorer
19-
EXPLORER_PORT=4444
20-
# Archive gateway endpoint
21-
ARCHIVE_GATEWAY_URL=http://orion_archive_gateway:${GATEWAY_PORT}/graphql
22-
23-
# Orion services ports
24-
GRAPHQL_API_PORT=4350
25-
AUTH_API_PORT=4074
10+
DB_PORT=23798
11+
# Processor service host
12+
PROCESSOR_HOST=localhost
13+
# Processor service prometheus port
2614
PROCESSOR_PROMETHEUS_PORT=3337
27-
28-
# Express.js "trust proxy" setting
29-
# It specifies which IP addresses are considered "trusted" to provide
30-
# correct values in the `X-Forwarded-For` header (to avoid ip spoofing).
31-
# `uniquelocal` means all local network addresses are trusted, ie:
32-
# 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7
33-
# When using the default docker-compose setup, this is the recommended setting.
34-
# To read more about the `trust proxy` setting, see:
35-
# https://expressjs.com/en/guide/behind-proxies.html
36-
TRUST_PROXY=uniquelocal
37-
38-
# Enable/disable Auth API playground
39-
OPENAPI_PLAYGROUND=true
40-
41-
# DEVELOPMENT SETTINGS:
42-
# WARNING: DO NOT USE THESE SETTINGS IN PRODUCTION!
43-
ORION_ENV=development
44-
DEV_DISABLE_SAME_SITE=true
45-
46-
# PRODUCTION SETTINGS:
47-
# A root domain of your Gateway, that will be used for setting the session cookie
48-
# and CORS headers. For example, if you are serving the GraphQL API and Auth API
49-
# under subdomains like `query.mygateway.com` and `auth.mygateway.com` and the Atlas
50-
# frontend directly under `mygateway.com`, you should set this value to `mygateway.com`.
51-
# ORION_ENV=production
52-
# GATEWAY_ROOT_DOMAIN=<YOUR GATEWAY ROOT DOMAIN>
53-
54-
# ==================================================================================
55-
# ========================= INITIAL GATEWAY CONFIGURATION ==========================
56-
# ==================================================================================
57-
58-
# The name of Your gateway (pick a unique one!)
59-
APP_NAME=<YOUR GATEWAY NAME>
60-
61-
# Whether videos with no category assigned should be visible on the gateway
62-
SUPPORT_NO_CATEGORY_VIDEOS=<true/false>
63-
64-
# Whether the gateway should support all newly created video categories
65-
# by default.
66-
SUPPORT_NEW_CATEGORIES=<true/false>
67-
68-
# Default value of the "kill switch". If set to true, it will force the
69-
# Atlas to start in a "maintenance mode", before the value of the kill
70-
# switch is changed via the operator API.
71-
KILL_SWITCH_ON=<true/false>
72-
73-
# The number of seconds that need to pass before a video view from the
74-
# same user is counted again.
75-
VIDEO_VIEW_PER_USER_TIME_LIMIT=300
76-
77-
# A secret string that will be used when authenticating as a Gateway operator.
78-
# It's recommended to generate a random string of at least 16 characters.
79-
# For example: `openssl rand -base64 18`
80-
OPERATOR_SECRET=<SECURELY RANDOM SECRET>
81-
82-
# Weights used for calclating the relevance score of a video.
83-
# The relevance score affects the order in which videos are displayed
84-
# on the homepage of Atlas.
85-
# The first value is the "newness_weight",
86-
# The second value is the "views_weight",
87-
# The third value is the "comments_weight",
88-
# The fourth value is the "reactions_weight".
89-
# The fifth value is a list of two values:
90-
# - joystreamCreationWeight: how much Video.createdAt date affects the `newness` score
91-
# - ytCreationWeight: how much Video.publishedBeforeJoystream affects the `newness` score
92-
# The sixth value is the "channel_weight".
93-
# The relevance score is calculated as follows:
94-
# ```
95-
# (
96-
# newness * newness_weight +
97-
# views * views_weight +
98-
# comments * comments_weight +
99-
# reactions * reactions_weight
100-
# ) * channel_weight
101-
# ```
102-
# Where newness is:
103-
# ```
104-
# -(
105-
# (days since Video.createdAt * joystreamCreationWeight) +
106-
# (days since Video.publishedBeforeJoystream * ytCreationWeight)
107-
# ) / (joystreamCreationWeight + ytCreationWeight)
108-
# ```
109-
RELEVANCE_WEIGHTS="[1, 0.03, 0.3, 0.5, [7,3], 1]"
110-
111-
# After how many new video views, the relevance score of a video should
112-
# be recalculated.
15+
# Graphql server port
16+
GQL_PORT=4350
17+
# Auth api port
18+
AUTH_API_PORT=4074
19+
# RabbitMQ
20+
RABBITMQ_PORT=5672
21+
RABBITMQ_URL=amqp://orion_rabbitmq
22+
23+
# Archive gateway url
24+
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://localhost:8888/graphql}
25+
26+
# ======================================================
27+
# ============== DEFAULT CONFIG VALUES =================
28+
# ======================================================
29+
APP_NAME=Gleev
30+
SUPPORT_NO_CATEGORY_VIDEOS=true
31+
SUPPORT_NEW_CATEGORIES=true
32+
CRT_MARKET_CAP_MIN_VOLUME_JOY=100
33+
KILL_SWITCH_ON=false
34+
# 10 seconds
35+
VIDEO_VIEW_PER_USER_TIME_LIMIT=10
36+
# Operator API secret
37+
OPERATOR_SECRET=this-is-not-so-secret-change-it
38+
# every 10 views video relevance score will be recalculated
11339
VIDEO_RELEVANCE_VIEWS_TICK=10
114-
115-
# Maximum number of entities that can be cached in Orion processor's memory.
116-
# If the Orion processor service is running out of memory, try decreasing
117-
# this value.
118-
MAX_CACHED_ENTITIES=1000
119-
120-
# A secret string used to generate a private key for signing the attestation
121-
# that certain channels and videos were created throguh Your gateway.
122-
# It's recommended to generate a random string of at least 16 characters.
123-
# For example: `openssl rand -base64 18`
124-
APP_PRIVATE_KEY=<SECURELY RANDOM SECRET>
125-
126-
# After how many minutes does the session expire in case of user inactivity.
127-
# Once the session expires, the user will need to re-authenticate.
40+
# every time a channel is followed / unfollowed, its weight will be recalculated
41+
CHANNEL_WEIGHT_FOLLOWS_TICK=1
42+
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'
43+
MAX_CACHED_ENTITIES=5000
44+
APP_PRIVATE_KEY=this-is-not-so-secret-change-it
12845
SESSION_EXPIRY_AFTER_INACTIVITY_MINUTES=60
129-
130-
# After how many hours does the session expire regardless of user activity.
13146
SESSION_MAX_DURATION_HOURS=720
47+
EMAIL_CONFIRMATION_ROUTE=http://localhost:4074/api/v1/confirm-email?token={token}
48+
EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS=24
49+
EMAIL_CONFIRMATION_TOKEN_RATE_LIMIT=5
50+
ACCOUNT_OWNERSHIP_PROOF_EXPIRY_TIME_SECONDS=300 # 5 minutes
51+
COOKIE_SECRET=this-is-not-so-secret-change-it
13252

133-
# The route in Atlas used for the purpose of user e-mail confirmation.
134-
# CURRENTLY NOT USED
135-
EMAIL_CONFIRMATION_ROUTE=NOT_USED
53+
# Notification related variables
54+
APP_ROOT_DOMAIN=<APP_DOMAIN>
13655

137-
# The number of hours after which the e-mail confirmation link expires.
138-
EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS=24
56+
TRUST_PROXY=uniquelocal
13957

140-
# How many e-mail confirmation links can be sent to a user within
141-
# `EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS` (to prevent spamming)
142-
EMAIL_CONFIRMATION_TOKEN_RATE_LIMIT=5
58+
# Sendgrid API
59+
SENDGRID_API_KEY=
60+
SENDGRID_FROM_EMAIL=gateway@example.com
14361

144-
# How many seconds have to pass since the timestamp included in a signed message
145-
# that proves the ownership of a Joystream account/address, before the message
146-
# is considered expired.
147-
ACCOUNT_OWNERSHIP_PROOF_EXPIRY_TIME_SECONDS=300 # 5 minutes
62+
# Detectlanguage
63+
DETECTLANGUAGE_API_KEY=
64+
65+
# Debug settings
66+
SQD_DEBUG=api:*
14867

149-
# A secret string used to generate a private key for the purpose of signing cookies,
150-
# to ensure that the cookies sent by the client application (like Atlas) have been
151-
# indeed set by your instance of Orion and have not been tampered with.
152-
# It's recommended to generate a random string of at least 16 characters.
153-
# For example: `openssl rand -base64 18`
154-
COOKIE_SECRET=<SECURELY RANDOM SECRET>
68+
# playground
69+
OPENAPI_PLAYGROUND=true
15570

15671
# max number of attempts to deliver email notification
15772
EMAIL_NOTIFICATION_DELIVERY_MAX_ATTEMPTS=5
15873

159-
# Sendgrid API
160-
# Sendgrid configuration of api key and email address used to send transactional mails from
161-
SENDGRID_API_KEY=<SENDGRID API KEY>
162-
SENDGRID_FROM_EMAIL=<NO-REPLY EMAIL ADDRESS>
163-
16474
# Notification emails storage links
165-
# Online path which contains the icons and logo to display in the notification e-mails
166-
APP_ASSET_STORAGE=<LINK_TO_STORAGE_ASSETS>
75+
APP_ASSET_STORAGE=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/logos/gleev
16776

16877
# Name of the application link displayed in the notification e-mail footer
16978
APP_NAME_ALT=<ALTERNATIVE_APP_NAME>
79+
80+
# Set URL where the notification icons are stored.
81+
NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/icons
82+
83+
# =====================================================================================
84+
# Telemetry
85+
# =====================================================================================
86+
87+
# yes/no
88+
TELEMETRY_ENABLED=no
89+
TELEMETRY_ENDPOINT=http://apm-server:8200
90+
91+
# every time a channel is followed / unfollowed, its weight will be recalculated
92+
CHANNEL_WEIGHT_FOLLOWS_TICK=1
93+
94+
# set the minimum amounts of JOY tokens required to obtain each tier
95+
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'
96+
97+
# set the volume threshold below which tokens are considered to have no market cap
98+
CRT_MARKET_CAP_MIN_VOLUME_JOY=100

0 commit comments

Comments
 (0)