Skip to content
F43nd1r edited this page Aug 7, 2022 · 10 revisions

All configuration options in this file are given in the form this.is.a.property. To configure those using environment variables, e.g. in docker-compose.yml those options have to be converted to an environment variable name.

To convert a property name in the canonical-form to an environment variable name you can follow these rules:

  • Replace dots (.) with underscores (_).
  • Remove any dashes (-).
  • Convert to uppercase.

For example, the configuration property spring.main.log-startup-info would be an environment variable named SPRING_MAIN_LOGSTARTUPINFO.

See (Spring) Binding from Environment Variables

Mail notifications

To enable mail notifications a mail server (e.g. postfix) is needed.

spring.mail.host=localhost
spring.mail.port=25
spring.mail.username=[[mail_user]]
spring.mail.password=[[mail_password]]
spring.mail.sender=[[mail_sender]]

When this configuration is present, users can opt in to mail notifications using the UI.

API access

Users can be granted access to the acrarium API, which provides RESTful read-only access to its data. Available methods can be found here.

Health-check and other production-ready features

Acrarium bundles Spring Boot Actuator. All endpoints are disabled by default.

You can enable the ones you need, e.g.

management.endpoint.health.enabled=true

Actuator endpoints can be accessed with a user having API permissions.

Swagger API Documentation

Since 1.9

Acrarium bundles SpringDoc. To enable the swagger UI actuator needs to run on a separate port (8081 as an example here)

management.server.port=8081

Then you can enable the swagger UI

springdoc.swagger-ui.enabled=true
management.endpoint.swagger-ui.enabled=true
management.endpoint.openapi.enabled=true

and reach it under /actuator/swagger-ui/

Advanced configuration

Acrarium is built with Spring Boot, so most Spring Boot configuration options work as well. Some examples:

# This is necessary in multiple situations, e.g. to make links in mails work.
server.context-path=https://example.com:8080

# Enable ssl
server.ssl.enabled=true
server.ssl.key-store=[[path]]
server.ssl.key-store-password=[[password]]
server.ssl.key-alias=1[[domain]]
server.ssl.enabled-protocols=TLSv1.2
security.require-ssl=true

# Debug Vaadin
vaadin.servlet.productionMode=false

# Change Port
server.port=443
# change bind IP (standalone only, for example with a reverse proxy in front)
server.address=127.0.0.1

Command line initialization

Since 1.5

You can create users in Acrarium from the command line using command line arguments:

--create-user=[[username]] --password=[[password]] --roles=[[ADMIN,USER,API]]

The roles parameter is optional and defaults to all three.

Note: This is the only way to create an API-only user.