Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ EMAIL_NOTIFICATION_DELIVERY_MAX_ATTEMPTS=5

# Notification emails storage links
APP_ASSET_STORAGE=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/logos/gleev

# Name of the application link displayed in the notification e-mail footer
APP_NAME_ALT=Gleev.xyz

# Set URL where the notification icons are stored.
NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/icons

# =====================================================================================
Expand All @@ -83,3 +87,12 @@ NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notifi
# yes/no
TELEMETRY_ENABLED=no
TELEMETRY_ENDPOINT=http://apm-server:8200

# every time a channel is followed / unfollowed, its weight will be recalculated
CHANNEL_WEIGHT_FOLLOWS_TICK=1

# set the minimum amounts of JOY tokens required to obtain each tier
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'

# set the volume threshold below which tokens are considered to have no market cap
CRT_MARKET_CAP_MIN_VOLUME_JOY=100
223 changes: 76 additions & 147 deletions docs/operator-guide/examples/.env
Original file line number Diff line number Diff line change
@@ -1,169 +1,98 @@
# LOCAL DEV ENVIRONMENT
ORION_ENV=development
DEV_DISABLE_SAME_SITE=true

# 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
DB_PORT=23798
# Processor service host
PROCESSOR_HOST=localhost
# Processor service prometheus port
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.
# Graphql server port
GQL_PORT=4350
# Auth api port
AUTH_API_PORT=4074
# RabbitMQ
RABBITMQ_PORT=5672
RABBITMQ_URL=amqp://orion_rabbitmq

# Archive gateway url
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://localhost:8888/graphql}

# ======================================================
# ============== DEFAULT CONFIG VALUES =================
# ======================================================
APP_NAME=Gleev
SUPPORT_NO_CATEGORY_VIDEOS=true
SUPPORT_NEW_CATEGORIES=true
CRT_MARKET_CAP_MIN_VOLUME_JOY=100
KILL_SWITCH_ON=false
# 10 seconds
VIDEO_VIEW_PER_USER_TIME_LIMIT=10
# Operator API secret
OPERATOR_SECRET=this-is-not-so-secret-change-it
# every 10 views video relevance score will 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.
# every time a channel is followed / unfollowed, its weight will be recalculated
CHANNEL_WEIGHT_FOLLOWS_TICK=1
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'
MAX_CACHED_ENTITIES=5000
APP_PRIVATE_KEY=this-is-not-so-secret-change-it
SESSION_EXPIRY_AFTER_INACTIVITY_MINUTES=60

# After how many hours does the session expire regardless of user activity.
SESSION_MAX_DURATION_HOURS=720
EMAIL_CONFIRMATION_ROUTE=http://localhost:4074/api/v1/confirm-email?token={token}
EMAIL_CONFIRMATION_TOKEN_EXPIRY_TIME_HOURS=24
EMAIL_CONFIRMATION_TOKEN_RATE_LIMIT=5
ACCOUNT_OWNERSHIP_PROOF_EXPIRY_TIME_SECONDS=300 # 5 minutes
COOKIE_SECRET=this-is-not-so-secret-change-it

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

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

# 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
# Sendgrid API
SENDGRID_API_KEY=
SENDGRID_FROM_EMAIL=gateway@example.com

# 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
# Detectlanguage
DETECTLANGUAGE_API_KEY=

# Debug settings
SQD_DEBUG=api:*

# 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>
# playground
OPENAPI_PLAYGROUND=true

# 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>
APP_ASSET_STORAGE=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/logos/gleev

# Name of the application link displayed in the notification e-mail footer
APP_NAME_ALT=<ALTERNATIVE_APP_NAME>

# Set URL where the notification icons are stored.
NOTIFICATION_ASSET_ROOT=https://raw.githubusercontent.com/Joystream/atlas-notification-assets/main/icons

# =====================================================================================
# Telemetry
# =====================================================================================

# yes/no
TELEMETRY_ENABLED=no
TELEMETRY_ENDPOINT=http://apm-server:8200

# every time a channel is followed / unfollowed, its weight will be recalculated
CHANNEL_WEIGHT_FOLLOWS_TICK=1

# set the minimum amounts of JOY tokens required to obtain each tier
COMMENT_TIP_TIERS='{"SILVER": 100, "GOLD": 500, "DIAMOND": 1000}'

# set the volume threshold below which tokens are considered to have no market cap
CRT_MARKET_CAP_MIN_VOLUME_JOY=100
Loading
Loading