MorrowM / flora-server

Server for Flora

Home Page:https://flora.pm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flora

CI badge made with Haskell

about page

Installation and Configuration

For ease of development, a shell.nix file is provided. It brings with it system dependency and tooling.

To jump into the development environment, use make nix-shell. It is impure by default, so your editor and development tools will still be accessible.

Flora server

Configuration is handled through environment variables. They are all prefixed by FLORA_ to avoid conflict, and the server will tell you which ones are missing.

To start in the best of conditions, create a file called environment.local.sh with the following content:

source environment.sh

# export FLORA_SENTRY_DSN="" # Don't forget to add your Sentry DSN if you use it!
# export FLORA_PROMETHEUS_ENABLED="true"

This will get all the variables from environment.sh and allow you to override them.

You can then build the server with

# To build the binaries
$ make build
# To load the main library in a REPL
$ make repl

Database

the Flora server uses PostgreSQL 14.1

To create the database and apply the migrations, type:

$ make db-setup # Implies db-create

you can also use db-create and db-drop to create and delete the database in the PostgreSQL instance.


You can explore the Makefile rules by typing make in your shell.

About

Server for Flora

https://flora.pm

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 89.1%Language:Shell 3.2%Language:CSS 2.5%Language:Makefile 2.5%Language:JavaScript 1.7%Language:Nix 1.1%