This repository has been archived on 2023-05-06. You can view files and clone it, but cannot push or open issues or pull requests.
pleroma-ansible-playbook/roles/pleroma-backend/templates/etc_pleroma_config.exs.j2
Dan Anglin cb22739b38
feat: allow owners to set the background image.
This commit allows instance owners to set a background
image for their Pleroma instances. It copies the image from
the ansible controller onto the target host and updates the
Pleroma configuration.

Owners can set the value for pleroma.config.frontend.background
to set the background image. The default image is used if
this value is not set.
2019-11-12 23:09:21 +00:00

80 lines
2.5 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 }},
dynamic_configuration: {{ pleroma.config.dynamicConfiguration }},
federating: {{ pleroma.config.federating }}
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 }}"
{% if pleroma.config.frontend.background|length %}
config :pleroma, :frontend_configurations,
pleroma_fe: %{
background: "/images/pleroma-background.png"
}
{% endif %}