infrastructure/roles/vikunja/templates/config.yml
saibotk ea3f4919c5
vikunja: Add role
This patch introduces the new vikunja role. Vikunja is an easy and awesome ToDo application.
2021-09-16 05:42:23 +02:00

189 lines
8.7 KiB
YAML

{{ ansible_managed | comment }}
# Vikunja application configuration
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
service:
{% if vikunja_service_jwtsecret | length %}
# This token is used to verify issued JWT tokens.
# Default is a random token which will be generated at each startup of vikunja.
# (This means all already issued tokens will be invalid once you restart vikunja)
JWTSecret: "{{ vikunja_service_jwtsecret }}"
{% endif %}
# The interface on which to run the webserver
interface: ":3456"
# The URL of the frontend, used to send password reset emails.
frontendurl: "https://{{ vikunja_frontend_domain }}/"
# The base path on the file system where the binary and assets are.
# Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder
# with a config file which will then be used.
rootpath: "/app/vikunja/"
# The max number of items which can be returned per page
maxitemsperpage: 50
# Enable the caldav endpoint, see the docs for more details
enablecaldav: {{ vikunja_service_enablecaldav | bool }}
{% if vikunja_service_motd | length %}
# Set the motd message, available from the /info endpoint
motd: "{{ vikunja_service_motd }}"
{% endif %}
# Enable sharing of lists via a link
enablelinksharing: {{ vikunja_service_enablelinksharing | bool }}
# Whether to let new users registering themselves or not
enableregistration: {{ vikunja_service_enableregistration | bool }}
# Whether to enable task attachments or not
enabletaskattachments: {{ vikunja_service_enabletaskattachments | bool }}
# The time zone all timestamps are in. Please note that time zones have to use [the official tz database names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UTC or GMT offsets won't work.
timezone: {{ vikunja_service_timezone }}
# Whether task comments should be enabled or not
enabletaskcomments: {{ vikunja_service_enabletaskcomments | bool }}
# Whether totp is enabled. In most cases you want to leave that enabled.
enabletotp: {{ vikunja_service_enabletotp | bool }}
# If not empty, enables logging of crashes and unhandled errors in sentry.
# sentrydsn: ''
# If not empty, this will enable `/test/{table}` endpoints which allow to put any content in the database.
# Used to reset the db before frontend tests. Because this is quite a dangerous feature allowing for lots of harm,
# each request made to this endpoint neefs to provide an `Authorization: <token>` header with the token from below. <br/>
# **You should never use this unless you know exactly what you're doing**
# testingtoken: ''
# If enabled, vikunja will send an email to everyone who is either assigned to a task or created it when a task reminder
# is due.
enableemailreminders: {{ vikunja_service_enableemailreminders | bool }}
# If true, will allow users to request the complete deletion of their account. When using external authentication methods
# it may be required to coordinate with them in order to delete the account. This setting will not affect the cli commands
# for user deletion.
enableuserdeletion: {{ vikunja_service_enableuserdeletion | bool }}
database:
# Database type to use. Supported types are mysql, postgres and sqlite.
type: "postgres"
# Database user which is used to connect to the database.
user: "vikunja"
# Databse password
password: "{{ vikunja_database_password }}"
# Databse host
host: "db"
# Databse to use
database: "vikunja"
# When using sqlite, this is the path where to store the data
# path: "./vikunja.db"
# Sets the max open connections to the database. Only used when using mysql and postgres.
maxopenconnections: 100
# Sets the maximum number of idle connections to the db.
maxidleconnections: 50
# The maximum lifetime of a single db connection in miliseconds.
maxconnectionlifetime: 10000
# Secure connection mode. Only used with postgres.
# (see https://pkg.go.dev/github.com/lib/pq?tab=doc#hdr-Connection_String_Parameters)
sslmode: disable
# Enable SSL/TLS for mysql connections. Options: false, true, skip-verify, preferred
tls: false
cache:
# If cache is enabled or not
enabled: true
# Cache type. Possible values are "keyvalue", "memory" or "redis".
# When choosing "keyvalue" this setting follows the one configured in the "keyvalue" section.
# When choosing "redis" you will need to configure the redis connection seperately.
type: redis
# When using memory this defines the maximum size an element can take
maxelementsize: 1000
redis:
# Whether to enable redis or not
enabled: true
# The host of the redis server including its port.
host: 'redis:6379'
# The password used to authenicate against the redis server
password: ''
# 0 means default database
db: 0
cors:
# Whether to enable or disable cors headers.
# Note: If you want to put the frontend and the api on seperate domains or ports, you will need to enable this.
# Otherwise the frontend won't be able to make requests to the api through the browser.
enable: true
# A list of origins which may access the api. These need to include the protocol (`http://` or `https://`) and port, if any.
origins:
- "https://{{ vikunja_frontend_domain }}"
# How long (in seconds) the results of a preflight request can be cached.
maxage: 0
mailer:
{{ vikunja_mailer | to_nice_yaml(indent=2) | indent(2) }}
log:
{{ vikunja_log | to_nice_yaml(indent=2) | indent(2) }}
ratelimit:
{{ vikunja_ratelimit | to_nice_yaml(indent=2) | indent(2) }}
files:
# The path where files are stored
basepath: ./files # relative to the binary
# The maximum size of a file, as a human-readable string.
# Warning: The max size is limited 2^64-1 bytes due to the underlying datatype
maxsize: {{ vikunja_files_maxsize }}
migration:
{{ vikunja_migration | to_nice_yaml(indent=2) | indent(2) }}
avatar:
{{ vikunja_avatar | to_nice_yaml(indent=2) | indent(2) }}
backgrounds:
{{ vikunja_backgrounds | to_nice_yaml(indent=2) | indent(2) }}
# Legal urls
# Will be shown in the frontend if configured here
legal:
{{ vikunja_legal | to_nice_yaml(indent=2) | indent(2) }}
# Key Value Storage settings
# The Key Value Storage is used for different kinds of things like metrics and a few cache systems.
keyvalue:
# The type of the storage backend. Can be either "memory" or "redis". If "redis" is chosen it needs to be configured seperately.
type: "memory"
auth:
# Local authentication will let users log in and register (if enabled) through the db.
# This is the default auth mechanism and does not require any additional configuration.
local:
# Enable or disable local authentication
enabled: {{ vikunja_auth_local_enabled | bool }}
# OpenID configuration will allow users to authenticate through a third-party OpenID Connect compatible provider.<br/>
# The provider needs to support the `openid`, `profile` and `email` scopes.<br/>
# **Note:** Some openid providers (like gitlab) only make the email of the user available through openid claims if they have set it to be publicly visible.
# If the email is not public in those cases, authenticating will fail.
# **Note 2:** The frontend expects to be redirected after authentication by the third party
# to <frontend-url>/auth/openid/<auth key>. Please make sure to configure the redirect url with your third party
# auth service accordingy if you're using the default vikunja frontend.
# Take a look at the [default config file](https://kolaente.dev/vikunja/api/src/branch/main/config.yml.sample) for more information about how to configure openid authentication.
openid:
# Enable or disable OpenID Connect authentication
enabled: {{ vikunja_auth_openid_enabled | bool }}
# The url to redirect clients to. Defaults to the configured frontend url. If you're using Vikunja with the official
# frontend, you don't need to change this value.
# redirecturl: <frontend url>
# A list of enabled providers
providers:
{{ vikunja_auth_openid_providers | to_nice_yaml(indent=2) | indent(6) }}
# Prometheus metrics endpoint
metrics:
{{ vikunja_metrics | to_nice_yaml(indent=2) | indent(2) }}