From 7e0a5a8904103281e16234425824dba547f3c680 Mon Sep 17 00:00:00 2001 From: sn0w Date: Mon, 9 Apr 2018 00:33:52 +0200 Subject: [PATCH] Add new config options --- .env.dist | 7 +++++++ README.md | 2 +- docker-compose.m4 | 5 ++++- docker-config.exs | 32 +++++++++++++++++++------------- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.env.dist b/.env.dist index 550107c..0f8c52f 100644 --- a/.env.dist +++ b/.env.dist @@ -48,3 +48,10 @@ PLEROMA_MEDIA_PROXY_URL= # DB PLEROMA_DB_POOL_SIZE= + +# Where to store uploaded content +# Can be a relative path, "~/...", or absolute. +PLEROMA_UPLOADS_PATH= + +# Whether to enable the chat feature or not +PLEROMA_CHAT_ENABLED= diff --git a/README.md b/README.md index 7c6e0c4..a92da2d 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Here are a few customization examples: - Save them in `custom.d/priv/static/emoji`. Then create and/or edit `custom.d/config/custom_emoji.txt`. - I want custom ToS - - Throw a HTML document to `priv/static/static/terms-of-service.html` + - Throw a HTML document to `custom.d/priv/static/static/terms-of-service.html` You get the gist.
Pretty basic stuff. diff --git a/docker-compose.m4 b/docker-compose.m4 index c9ae90a..80b7b49 100644 --- a/docker-compose.m4 +++ b/docker-compose.m4 @@ -53,17 +53,20 @@ services: env(`pleroma_media_proxy_redirect_on_failure') env(`pleroma_media_proxy_url') env(`pleroma_db_pool_size') + env(`pleroma_uploads_path') + env(`pleroma_chat_enabled') env_fb(`mix_env', `prod') volumes: - ./custom.d:/custom.d + - env_inline(`docker_datadir')/uploads:env_inline(`pleroma_uploads_path') labels: traefik.enable: "true" traefik.fe.port: "4000" traefik.fe.protocol: "http" traefik.fe.entryPoints: "http,https" traefik.fe.frontend.rule: "Host:env_inline(`pleroma_url')" - traefik.cache.port: "80" + traefik.cache.port: "4000" traefik.cache.protocol: "http" traefik.cache.entryPoints: "http,https" traefik.cache.frontend.rule: "Host:env_inline(`pleroma_media_proxy_url')" diff --git a/docker-config.exs b/docker-config.exs index e98f76c..f4d565f 100644 --- a/docker-config.exs +++ b/docker-config.exs @@ -22,21 +22,27 @@ config :pleroma, Pleroma.Web.Endpoint, ], secret_key_base: Docker.env(:secret_key_base) +config :pleroma, Pleroma.Upload, + uploads: Docker.env(:uploads_path) + +config :pleroma, :chat, + enabled: Docker.env(:chat_enabled) + config :pleroma, :instance, - name: Docker.env(:name), - email: Docker.env(:admin_email), - limit: Docker.env(:user_limit), - registrations_open: Docker.env(:registrations_open) + name: Docker.env(:name), + email: Docker.env(:admin_email), + limit: Docker.env(:user_limit), + registrations_open: Docker.env(:registrations_open) config :pleroma, :media_proxy, - enabled: Docker.env(:media_proxy_enabled), - redirect_on_failure: Docker.env(:media_proxy_redirect_on_failure), - base_url: Docker.env(:media_proxy_url) + enabled: Docker.env(:media_proxy_enabled), + redirect_on_failure: Docker.env(:media_proxy_redirect_on_failure), + base_url: Docker.env(:media_proxy_url) config :pleroma, Pleroma.Repo, - adapter: Ecto.Adapters.Postgres, - username: Docker.env(:postgres_user, true), - password: Docker.env(:postgres_password, true), - database: Docker.env(:postgres_db, true), - hostname: Docker.env(:postgres_ip, true), - pool_size: Docker.env(:db_pool_size) + adapter: Ecto.Adapters.Postgres, + username: Docker.env(:postgres_user, true), + password: Docker.env(:postgres_password, true), + database: Docker.env(:postgres_db, true), + hostname: Docker.env(:postgres_ip, true), + pool_size: Docker.env(:db_pool_size)