2023-11-19 03:51:45 +00:00
|
|
|
## trifid-api configuration file ##
|
|
|
|
# This file contains all of the buttons and knobs you can use to configure trifid to your liking.
|
|
|
|
# This file does not autoreload, you need to restart trifid-api for changes here to apply.
|
|
|
|
|
|
|
|
|
|
|
|
# [server] contains options for the HTTP server used to serve the API.
|
|
|
|
[server]
|
|
|
|
# (Required) What IP and port to bind the HTTP listener to.
|
|
|
|
bind = { ip = "127.0.0.1", port = 8080 }
|
|
|
|
# How many worker threads to start. The higher the number, the more resources trifid-api will use while idle, but
|
|
|
|
# the more parallel requests it can handle.
|
|
|
|
# Optional. Defaults to the number of physical CPUs in the system.
|
|
|
|
#workers = 16
|
|
|
|
|
|
|
|
# [database] contains options for the Postgres database used for all data storage
|
|
|
|
[database]
|
|
|
|
# (Required) The postgres database connection url to use
|
2023-11-19 16:31:30 +00:00
|
|
|
url = "postgres://postgres:postgres@localhost/trifid2"
|
|
|
|
|
|
|
|
# [email] contains options for the SMTP connection used to send magic link emails
|
|
|
|
[email]
|
|
|
|
# (Required) The mail server to connect to
|
|
|
|
server = "mail.e3t.cc"
|
|
|
|
# (Required) The SMTP port to connect to.
|
2023-11-19 16:36:06 +00:00
|
|
|
port = 465
|
2023-11-19 16:31:30 +00:00
|
|
|
# (Required) The username to authenticate with.
|
2023-11-19 16:36:06 +00:00
|
|
|
username = "core"
|
2023-11-19 16:31:30 +00:00
|
|
|
# (Required) The password to authenticate with. If set to %PASSWORD%, will be filled from the environment variable TRIFID_EMAIL_PASSWORD.
|
|
|
|
password = "$PASSWORD$"
|
|
|
|
# (Required) The "From Name" to send the email from
|
|
|
|
from_name = "Trifid"
|
|
|
|
# (Required) The address to send the email from
|
2023-11-19 16:36:06 +00:00
|
|
|
from_email = "core@e3t.cc"
|
2023-11-19 16:31:30 +00:00
|
|
|
# (Required) The email template to use. %TOKEN% will be replaced with the magic link token.
|
|
|
|
template = "Click this link to sign in! http://localhost:5173/magic-link?magicLinkToken=%TOKEN%"
|
|
|
|
# (Required) Should STARTTLS be used?
|
|
|
|
starttls = false
|
|
|
|
|
|
|
|
# [tokens] contains options for token expiry
|
|
|
|
[tokens]
|
|
|
|
# (Required) How long should magic links be valid for, in seconds?
|
2023-11-20 01:58:46 +00:00
|
|
|
magic_link_expiry_seconds = 3600 # 1 hour
|
|
|
|
# (Required) How long should session tokens be valid for, in seconds? This controls how long users can remain "identified"
|
|
|
|
# before they must re-identify via magic link.
|
|
|
|
session_token_expiry_seconds = 31536000 # ~1 year
|