Dan Anglin
309a569c00
The commit adds the option to allow instance admins to enable or disbale the chat window at the bottom right of the page. By default the chat window is enabled. This resolves dananglin/pleroma-ansible-playbook#10
114 lines
3.6 KiB
Django/Jinja
114 lines
3.6 KiB
Django/Jinja
import Config
|
|
|
|
config :pleroma, Pleroma.Web.Endpoint,
|
|
url: [
|
|
host: "{{ pleroma.config.host }}",
|
|
scheme: "https",
|
|
port: 443
|
|
],
|
|
http: [
|
|
ip: {127, 0, 0, 1},
|
|
port: {{ pleroma.config.listeningPort }}
|
|
],
|
|
secret_key_base: "{{ pleroma.config.secretKeyBase }}",
|
|
secure_cookie_flag: true,
|
|
signing_salt: "{{ pleroma.config.signingSalt }}"
|
|
|
|
config :pleroma, :instance,
|
|
name: "{{ pleroma.config.instanceName }}",
|
|
email: "{{ pleroma.config.email }}",
|
|
notify_email: "{{ pleroma.config.notifyEmail }}",
|
|
description: "{{ pleroma.config.instanceDescription }}",
|
|
limit: {{ pleroma.config.characterLimit }},
|
|
registrations_open: {{ pleroma.config.registrationsOpen }},
|
|
healthcheck: {{ pleroma.config.healthCheck }},
|
|
remote_post_retention_days: {{ pleroma.config.remotePostRetentionDays }},
|
|
dynamic_configuration: {{ pleroma.config.dynamicConfiguration }},
|
|
federating: {{ pleroma.config.federating }},
|
|
rewrite_policy: [Pleroma.Web.ActivityPub.MRF.SimplePolicy]
|
|
|
|
config :pleroma, :media_proxy,
|
|
enabled: false,
|
|
redirect_on_failure: true
|
|
#base_url: "https://cache.pleroma.social"
|
|
|
|
config :pleroma, Pleroma.Repo,
|
|
adapter: Ecto.Adapters.Postgres,
|
|
username: "{{ pleroma.config.db.user }}",
|
|
password: "{{ pleroma.config.db.password }}",
|
|
database: "{{ pleroma.config.db.name }}",
|
|
hostname: "localhost",
|
|
pool_size: 10
|
|
|
|
config :pleroma, :database, rum_enabled: false
|
|
config :pleroma, :instance, static_dir: "{{ pleroma_static_dir }}"
|
|
config :pleroma, Pleroma.Uploaders.Local, uploads: "{{ pleroma_uploads_dir }}"
|
|
|
|
# Enable Strict-Transport-Security once SSL is working:
|
|
config :pleroma, :http_security,
|
|
sts: true
|
|
|
|
# I probably would like to set this up at some point
|
|
# https://docs-develop.pleroma.social/backend/configuration/cheatsheet/#pleromaemailsmailer
|
|
config :pleroma, Pleroma.Emails.Mailer,
|
|
adapter: Swoosh.Adapters.Local,
|
|
enabled: false
|
|
|
|
# Ensure logs are sent to syslog
|
|
config :logger,
|
|
backends: [
|
|
{ExSyslogger, :ex_syslogger}
|
|
],
|
|
level: :{{ pleroma.config.logLevel }}
|
|
|
|
config :logger, :ex_syslogger,
|
|
level: :{{ pleroma.config.logLevel }},
|
|
format: "$date $time [$level] $message",
|
|
facility: :local1,
|
|
option: [:pid, :ndelay],
|
|
ident: "pleroma"
|
|
|
|
# Configure web push notifications
|
|
config :web_push_encryption, :vapid_details,
|
|
subject: "mailto:{{ pleroma.config.webPushEncryption.email }}",
|
|
private_key: "{{ pleroma.config.webPushEncryption.privateKey }}",
|
|
public_key: "{{ pleroma.config.webPushEncryption.publicKey }}"
|
|
|
|
config :pleroma, :frontend_configurations,
|
|
pleroma_fe: %{
|
|
{% if pleroma.config.frontend.background|length %}
|
|
background: "/images/pleroma-background.png",
|
|
{% else %}
|
|
background: "/images/city.jpg",
|
|
{% endif %}
|
|
theme: "{{ pleroma.config.frontend.themes.default }}"
|
|
}
|
|
|
|
config :pleroma, :mrf_simple,
|
|
reject: [
|
|
{% for item in pleroma.config.mrf.simplePolicy.reject %}
|
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
|
{% endfor %}
|
|
],
|
|
federated_timeline_removal: [
|
|
{% for item in pleroma.config.mrf.simplePolicy.federatedTimelineRemoval %}
|
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
|
{% endfor %}
|
|
],
|
|
media_removal: [
|
|
{% for item in pleroma.config.mrf.simplePolicy.mediaRemoval %}
|
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
|
{% endfor %}
|
|
],
|
|
media_nsfw: [
|
|
{% for item in pleroma.config.mrf.simplePolicy.mediaNsfw %}
|
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
|
{% endfor %}
|
|
],
|
|
report_removal: [
|
|
{% for item in pleroma.config.mrf.simplePolicy.reportRemoval %}
|
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
|
{% endfor %}
|
|
]
|
|
|
|
config :pleroma, :chat, enabled: {{ pleroma.config.chatEnabled }}
|