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/templates/etc_pleroma_config.exs.j2
Dan Anglin b0ddbc30ad
added: configuration for Pleroma
This merge request adds the template file and default variables for
configuring Pleroma.
Also included in this merge request are:

- added: Makefile to produce the secret key base, signing salt and the
public and private keys for web encryption.
- fixed: Pleroma OTP builds are now downloaded from the stable branch.
- changed: removed data from the pleroma task and added them in the
variable directory.
2019-10-15 09:16:24 +01:00

73 lines
2.3 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 }}"