fediverse.space/backend
Tao Bojlén ed0c28f24e fix nodeinfo for some pixelfed instances 2023-06-10 20:41:38 +01:00
..
config crawl less often, and fewer statuses 2023-06-10 20:23:07 +01:00
lib fix nodeinfo for some pixelfed instances 2023-06-10 20:41:38 +01:00
priv improved edges 2019-08-27 13:50:16 +00:00
rel/rel refactor/elixir backend 2019-07-14 11:47:06 +00:00
test fix nodeinfo for some pixelfed instances 2023-06-10 20:41:38 +01:00
.credo.exs update backend 2023-06-04 16:41:15 +01:00
.dockerignore refactor/elixir backend 2019-07-14 11:47:06 +00:00
.formatter.exs update to phoenix 1.7 2023-06-04 19:02:21 +01:00
.sobelow-conf set up sobelow for backend 2019-07-17 16:16:25 +00:00
CHECKS add healthcheck 2023-06-10 15:32:53 +01:00
Dockerfile add healthcheck 2023-06-10 15:32:53 +01:00
Procfile update gollum; more logging in indexer 2019-07-31 18:56:21 +03:00
README.md update backend 2023-06-04 16:41:15 +01:00
mix.exs fix nodeinfo and add basic tests 2023-06-10 18:53:10 +01:00
mix.lock fix nodeinfo and add basic tests 2023-06-10 18:53:10 +01:00
package-lock.json update frontend deps 2023-06-10 11:40:09 +01:00

README.md

fediverse.space backend

Notes

  • This project requires Elixir >= 1.14.
  • Run with SKIP_CRAWL=true to just run the server (useful for working on the API without also crawling)
  • This project is automatically scanned for potential vulnerabilities with Sobelow.

Configuration

There are several environment variables you can set to configure how the crawler behaves.

  • DATABASE_URL (required) . The URL of the Postgres db.
  • POOL_SIZE. The size of the database pool. Default: 10
  • PORT. Default: 4000
  • BACKEND_HOSTNAME (required). The url the backend is running on.
  • SECRET_KEY_BASE (required). Used for signing tokens.
  • TWILIO_ACCOUNT_SID. Used for sending SMS alerts to the admin.
  • TWILIO_AUTH_TOKEN. As above.
  • ADMIN_PHONE. The phone number to receive alerts at.
    • At the moment, the only alert is when there are potential new spam domains.
  • TWILIO_PHONE. The phone number to send alerts from.
  • ADMIN_EMAIL. Used for receiving alerts.
  • FRONTEND_DOMAIN (required). Used to generate login links for instance admins.
    • Don't enter https://, this is added automatically.
  • SENDGRID_API_KEY. Needed to send emails to the admin, or to instance admins who want to opt in/out.
  • MASTODON_DOMAIN. The domain (e.g. mastodon.social) that your bot login account is hosted on.
  • MASTODON_TOKEN. The access token for the bot login account.

Deployment

Deployment with Docker is handled as per the Distillery docs.

  • To build a new version, run make build in this directory.
  • To migrate a released version, run ./backend eval "Backend.Release.migrate"

Default README

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more