From 78496f271ad880377f3ce7de0575b220a283a279 Mon Sep 17 00:00:00 2001 From: Kegan Myers Date: Sun, 23 Jul 2023 15:33:08 -0500 Subject: [PATCH] add more realistic fake config --- .build.sh | 5 ++-- build.sh | 1 + prod.secret.exs | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/.build.sh b/.build.sh index 0bffa8a..608d82e 100755 --- a/.build.sh +++ b/.build.sh @@ -1,8 +1,9 @@ #!/bin/bash set -Eeuxo pipefail -# mix local.hex --force -# mix local.rebar --force +# unclear why these are needed as they _should_ already be done in the docker image build... +mix local.hex --force +mix local.rebar --force mix deps.get mix compile mix pleroma.frontend install pleroma-fe --ref stable diff --git a/build.sh b/build.sh index 5d5a38b..213bc89 100755 --- a/build.sh +++ b/build.sh @@ -30,6 +30,7 @@ docker run --rm \ -itv "$(pwd)/akkoma:/opt/akkoma" \ -v "$(pwd)/prod.secret.exs:/config/prod.secret.exs" \ -v "$(pwd)/.build.sh:/build.sh" \ + -e "PROD_SECRET_FILE=/config/prod.secret.exs" \ --entrypoint "" \ "${AKKOMA_BASE_IMAGE}" \ /build.sh diff --git a/prod.secret.exs b/prod.secret.exs index e69de29..c058d44 100644 --- a/prod.secret.exs +++ b/prod.secret.exs @@ -0,0 +1,64 @@ +import Config + +config :pleroma, Pleroma.Web.Endpoint, + url: [host: "akkoma.nrd.li", scheme: "https", port: 443], + http: [ip: {0, 0, 0, 0}, port: 4000] + +config :pleroma, :instance, + name: "NrdLi Akkoma", + email: "kegan@keganmyers.com", + notify_email: "akkoma@nrd.li", + limit: 5000, + registrations_open: false + +config :pleroma, :media_proxy, + enabled: true, + redirect_on_failure: false + # todo: + # base_url: "https://cache.pleroma.social" +config :pleroma, :media_preview_proxy, + enabled: true + +config :pleroma, Pleroma.Repo, + adapter: Ecto.Adapters.Postgres, + username: "fake", + password: "fake", + database: "fake", + hostname: "fake", + port: 5432 + +config :pleroma, :database, rum_enabled: false + +config :pleroma, :instance, static_dir: "/opt/akkoma/instance/static" + +config :pleroma, Pleroma.Upload, + uploader: Pleroma.Uploaders.S3, + base_url: "https://nrdli-akkoma-cdn.nyc3.cdn.digitaloceanspaces.com" + +config :pleroma, Pleroma.Uploaders.S3, + bucket: "nrdli-akkoma-cdn", + bucket_namespace: "uploads", + truncated_namespace: "", + streaming_enabled: true +config :ex_aws, :s3, + access_key_id: "fake", + secret_access_key: "fake", + region: "us-east-1", + scheme: "https://", + host: "nyc3.digitaloceanspaces.com" + +config :pleroma, configurable_from_database: true + +config :pleroma, Pleroma.Upload, filters: [Pleroma.Upload.Filter.Exiftool, Pleroma.Upload.Filter.AnonymizeFilename] + +config :pleroma, :frontends, + primary: %{ + "name" => "pleroma-fe", + "ref" => "stable" + }, + admin: %{ + "name" => "admin-fe", + "ref" => "stable" + } +config :pleroma, :mrf, + policies: [Pleroma.Web.ActivityPub.MRF.SimplePolicy]