mashirozx/mastodon

View on GitHub
.env.production.sample

Summary

Maintainability
Test Coverage
# This is a sample configuration file. You can generate your configuration
# with the `rake mastodon:setup` interactive setup wizard, but to customize
# your setup even further, you'll need to edit it manually. This sample does
# not demonstrate all available configuration options. Please look at
# https://docs.joinmastodon.org/admin/config/ for the full documentation.

# Note that this file accepts slightly different syntax depending on whether
# you are using `docker-compose` or not. In particular, if you use
# `docker-compose`, the value of each declared variable will be taken verbatim,
# including surrounding quotes.
# See: https://github.com/mastodon/mastodon/issues/16895

# Federation
# ----------
# This identifies your server and cannot be changed safely later
# ----------
LOCAL_DOMAIN=example.com

# Redis
# -----
REDIS_HOST=localhost
REDIS_PORT=6379

# PostgreSQL
# ----------
DB_HOST=/var/run/postgresql
DB_USER=mastodon
DB_NAME=mastodon_production
DB_PASS=
DB_PORT=5432

# Elasticsearch (optional)
# ------------------------
ES_ENABLED=true
ES_HOST=localhost
ES_PORT=9200
# Authentication for ES (optional)
ES_USER=elastic
ES_PASS=password

# Secrets
# -------
# Make sure to use `rake secret` to generate secrets
# -------
SECRET_KEY_BASE=
OTP_SECRET=

# Web Push
# --------
# Generate with `rake mastodon:webpush:generate_vapid_key`
# --------
VAPID_PRIVATE_KEY=
VAPID_PUBLIC_KEY=

# Sending mail
# ------------
SMTP_SERVER=smtp.mailgun.org
SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@example.com

# File storage (optional)
# -----------------------
S3_ENABLED=true
S3_BUCKET=files.example.com
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_ALIAS_HOST=files.example.com

# IP and session retention
# -----------------------
# Make sure to modify the scheduling of ip_cleanup_scheduler in config/sidekiq.yml
# to be less than daily if you lower IP_RETENTION_PERIOD below two days (172800).
# -----------------------
IP_RETENTION_PERIOD=31556952
SESSION_RETENTION_PERIOD=31556952

##
## Follow to the end of file is the configuration for mashirozx's fork
##
# Git display repo, please keep this to let more people reach this repo
GITHUB_REPOSITORY=mashirozx/mastodon

# Translation backend service
# - If you are using docker compose, you doesn't need to change this line.
# - If you are using systemd (or known as 'install from source'), please copy
#   `./dist/mastodon-translation.service` to `/etc/systemd/system/`, and change
#   next line to http://127.0.0.1:5000
TRANSLATION_SERVER_HOST=http://translation:5000
# Batch translation
# - When set to be `true`, the service only request Google's API once, and translate
#   all content at the same time.
TRANSLATION_BATCH=true
# Google Translation Domain (`com`, `cn`, `com.hk`, `uk`, and so on)
TRANSLATION_GOOGLE_TLD=cn

# Markdown image proxy, if not set, will not display image preview in markdown mode
IMAGE_PROXY_HOST=https://img-proxy.mashiro.top
IMAGE_PROXY_PATH=https://img-proxy.mashiro.top

# Max toot character limit
MAX_TOOT_CHARS=500

# Max media file size (megabytes)
IMAGE_LIMIT=10
VIDEO_LIMIT=40
AVATAR_LIMIT=2
HEADER_LIMIT=2
# Emoji size (kilobytes)
MAX_EMOJI_SIZE=51200
MAX_REMOTE_EMOJI_SIZE=204800

# Maximum custom emoji file sizes
# If undefined or smaller than MAX_EMOJI_SIZE, the value
# of MAX_EMOJI_SIZE will be used for MAX_REMOTE_EMOJI_SIZE
# Units are in bytes
MAX_EMOJI_SIZE=51200
MAX_REMOTE_EMOJI_SIZE=204800

# Allow insert remote media with url on toots
# eg:
# IMAGE: [https://example.com/example.png]
# VIDEO: [https://example.com/example.mp4/mp3]
ALLOW_REMOTE_MEDIA_TAG=true

# Analytics services
PLAUSIBLE_ANALYTICS_HOST=analytics.moezx.cc
# PLAUSIBLE_ANALYTICS_SITE_DOMAIN=hello.2heng.xin
MATOMO_ANALYTICS_HOST=analytics.2heng.xin
MATOMO_ANALYTICS_SITE_ID=3

# Third party OAuth providers
# Force skip invite request when using an OAuth provider
AUTO_REGISTRATION_WITH_AUTH_PROVIDERS=true

# When auth providers were set, the about page layout should better to be reordered
REORDER_ABOUT_PAGE=true

# Callback url: https://littlefo.rest/auth/auth/github/callback
# Scope: user.info
GITHUB_OAUTH2_ENABLED=true
GITHUB_OAUTH2_KEY=your_key
GITHUB_OAUTH2_SECRET=your_secret

# Callback url: https://littlefo.rest/auth/auth/gitlab/callback
# Scope: read_user
GITLAB_OAUTH2_ENABLED=true
GITLAB_OAUTH2_KEY=your_key
GITLAB_OAUTH2_SECRET=your_secret

# Callback url: https://littlefo.rest/auth/auth/gitee/callback
# Scope: user_info emails
GITEE_OAUTH2_ENABLED=true
GITEE_OAUTH2_KEY=your_key
GITEE_OAUTH2_SECRET=your_secret

# Azure Oauth 2 Authentication
# https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
# Callback url: https://littlefo.rest/auth/auth/azure_oauth2/callback
# Scope: email openid profile
AZURE_OAUTH2_ENABLED=true
# client id
AZURE_OAUTH2_KEY=your_key
# not the Secret ID but the value!
AZURE_OAUTH2_SECRET=your_secret
# optional tenant id if using a multi-tenant azure account: http://msdn.microsoft.com/en-us/library/azure/dn645542.aspx
AZURE_OAUTH2_TENANT_ID=your_tenant_id

# Logo pack
# Use custom logo pack, see details in `./design/`
# See detailed guidance:
# (Chinese): https://littlefo.rest/@mashiro/108718664789141341
# (English): https://littlefo.rest/@mashiro/109007049848241649
# Note this will only change the path of assets generated on Rails side, for the assets controlled inside webpack, use Nginx
# redirection instead.
LOGO_PACK=_forest

# Google Fonts proxy host
# Maybe only Chinese need this?
#FONTS_GOOGLEAPIS_PROXY_HOST=fonts.googleapis.com
#FONTS_GSTATIC_PROXY_HOST=fonts.gstatic.com