/fission-server

Primary LanguageRustApache License 2.0Apache-2.0

Code Coverage Build Status License Discord

⚠️ Work in progress ⚠️

Fission Server (& CLI)

This repository contains an implementation of the fission webserver, an implementation of a CLI that allows interacting with the webserver.

Overview

The dependencies between the crates in this workspace look like this:

flowchart TD
  fission-server --> fission-core
  fission-cli --> fission-core
Loading

Running the Webserver

Using nix

nix run . -- --config-path ./fission-server/config/settings.toml

Using pre-installed cargo & postgres

$ pg_ctl -o '-k /tmp' -D "./.pg" start
$ cargo run -p fission-server -- --config-path ./fission-server/config/settings.toml

Development

You can drop into a development shell, if you have nix installed via

$ nix develop

from the project root.

You can re-build and re-run the webserver on every file change via cargo watch:

$ cargo watch -c -s "cargo run -p fission-server -- -c ./fission-server/config/settings.toml"

Production

In production, you may want to enable the --no-colors flag on the executable.

All CLI flags are also available as environment-variables, so FISSION_SERVER__NO_COLORS=true and FISSION_SERVER__CONFIG_PATH="./prod-settings.toml" or even values from the settings.toml file itself. Double underscores are used as a separator between settings keys, because these can contain underscores themselves.

You'll also want to set server.environment = "prod" in settings.toml, and with that you'll need to provide a valid mailgun.api_key (can also be set as the environment variable FISSION_SERVER__MAILGUN__API_KEY=...).