Configuring the Editor service

Editor is a component of .

It is an application built with Spring Boot.

The Editor configuration consists of two files:

  • application.yaml - general system settings
  • application-seatmap.yaml - application-specific settings

application.yaml

Delay settings

Delay before starting the jobs after the system is started.

Parameter Environment variable Description Default value
initial INITIAL_DELAY Delay in milliseconds 5000 (five seconds)

Java Spring framework properties

Parameter Environment variable Description Default value
spring.profiles.include SPRING_PROFILES_INCLUDE Whether to add the properties from another profile seatmap
spring.jpa.generate-ddl SPRING_JPA_GENERATE_DDL Whether to enable DDL generation truspring.e
spring.jpa.properties.hibernate.jdbc.batch_size SPRING_JPA_PROPERTIES_HIBERNATE_JDBC_BATCH_SIZE Number of INSERT, UPDATE, and DELETE statements to be set in a single database call 50
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults SPRING_JPA_PROPERTIES_HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS Whether to consult the JDBC metadata to determine certain settings default values when the database may not be available false
spring.jpa.properties.hibernate.order_inserts SPRING_JPA_PROPERTIES_HIBERNATE_ORDER_INSERTS Whether to order SQL inserts by the primary key value of the items being inserted false
spring.jpa.properties.javax.persistence.schema-generation.create-source SPRING_JPA_PROPERTIES_JAVAX_PERSISTENCE_SCHEMA_GENERATION_CREATE_SOURCE Whether to generate the schema DDL commands metadata
spring.jpa.properties.javax.persistence.schema-generation.scripts.action SPRING_JPA_PROPERTIES_JAVAX_PERSISTENCE_SCHEMA_GENERATION_SCRIPTS_ACTION Whether to create or update the database schema update
spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target SPRING_JPA_PROPERTIES_JAVAX_PERSISTENCE_SCHEMA_GENERATION_SCRIPTS_CREATE_TARGET File name for script generation ddl_jpa_creation.sql
spring.jpa.hibernate.ddl-auto SPRING_JPA_HIBERNATE_DDL_AUTO How to initialize the database update
spring.jpa.hibernate.use-new-id-generator-mappings SPRING_JPA_HIBERNATE_USE_NEW_ID_GENERATOR_MAPPINGS Whether to generate identifier values based on an sequence-style database structure true
spring.jpa.database-platform SPRING_JPA_DATABASE_PLATFORM Used database org.hibernate.dialect.PostgreSQLDialect
spring.jpa.open-in-view SPRING_JPA_OPEN_IN_VIEW Whether to enable OSIV false
spring.jackson.mapper.DEFAULT_VIEW_INCLUSION SPRING_JACKSON_MAPPER_DEFAULT_VIEW_INCLUSION Whether to include non-annotated properties in all views true
spring.flyway.baseline-on-migrate SPRING_FLYWAY_BASELINE_ON_MIGRATE Whether to automatically call baseline when migrate is executed against a non-empty schema with no schema history table ’true'
spring.datasource.hikari.data-source-properties.reWriteBatchedInserts SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_REWRITEBATCHEDINSERTS Whether to rewrite regular insert statements into multi-value ones for batched inserts true
spring.datasource.hikari.maximum-pool-size SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE Maximum pool size 20
spring.datasource.hikari.connection-timeout SPRING_DATASOURCE_HIKARI_CONNECTION_TIMEOUT Connection timeout 60000
spring.datasource.driver-class-name SPRING_DATASOURCE_DRIVER_CLASS_NAME JDBC driver for communicating with the database org.postgresql.Driver
spring.datasource.password SPRING_DATASOURCE_PASSWORD Password for connecting to the database ${DB_PASSWORD:postgres}
spring.datasource.username SPRING_DATASOURCE_USERNAME Username for connecting to the database ${DB_USERNAME:seatmap}
spring.datasource.url SPRING_DATASOURCE_URL Database location ${DB_URL:jdbc:postgresql://localhost:15432/seatmap}
spring.servlet.multipart.enabled SPRING_SERVLET_MULTIPART_ENABLED Whether to enable support of multipart uploads true
spring.servlet.multipart.max-file-size SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE Maximum size permitted for uploaded files 200MB
spring.servlet.multipart.max-request-size SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE Maximum size allowed for multipart/form-data requests 215MB
spring.servlet.multipart.file-size-threshold SPRING_SERVLET_MULTIPART_FILE_SIZE_THRESHOLD Size threshold after which files will be written to disk 2KB
spring.mvc.pathmatch.matching-strategy SPRING_MVC_PATHMATCH_MATCHING_STRATEGY Implementation strategy for matching request paths to Controller handlers ant_path_matcher
spring.data.redis.port SPRING_DATA_REDIS_PORT Redis server port 16379
spring.data.redis.host SPRING_DATA_REDIS_HOST Redis server host localhost
spring.session.jdbc.schema SPRING_SESSION_JDBC_SCHEMA Database script classpath:org/springframework/session/jdbc/schema-postgresql.sql
spring.session.jdbc.initialize-schema SPRING_SESSION_JDBC_INITIALIZE_SCHEMA When to initialize the schema always
spring.session.jdbc.table-name SPRING_SESSION_JDBC_TABLE_NAME Table name to use SPRING_SESSION
spring.session.store-type SPRING_SESSION_STORE_TYPE Data store type jdbc

Logging settings

Logging settings to apply to the classes in the pro.seatmap package.

Parameter Environment variable Description Default value
logging.level.pro.seatmap LOGGING_LEVEL_PRO_SEATMAP Logging level DEBUG

Server settings

Parameter Environment variable Description Default value
server.compression.min-response-size SERVER_COMPRESSION_MIN_RESPONSE_SIZE Minimum size of files to compress 1024
server.compression.enabled SERVER_COMPRESSION_ENABLED Whether to compress data true
server.compression.mime-types SERVER_COMPRESSION_MIME_TYPES Mime types to compress text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
server.servlet.session.timeout SERVER_SERVLET_SESSION_TIMEOUT Servlet session lifetime 2d
server.tomcat.max-http-form-post-size SERVER_TOMCAT_MAX_HTTP_FORM_POST_SIZE Maximum size of a POST request 20MB

Notification settings

Path for Image Ready notifications.

Parameter Environment variable Description Default value
notify.path NOTIFY_PATH Notification path /topic/venues/

application-seatmap.yaml

In the application-seatmap.yaml file, you can configure the parameters described below.

Security settings

The security block allows you to set the lifetime for the refresh and access tokens as well as to manage the keys.

Parameter Environment variable Description Default value
seatmap.security.token.refresh.expire-duration SEATMAP_SECURITY_TOKEN_REFRESH_EXPIRE_DURATION Refresh token lifetime. Format: PTnHnMnS, where n is the relevant hours, minutes or seconds PT2H (two hours)
seatmap.security.token.access.expire-length SEATMAP_SECURITY_TOKEN_ACCESS_EXPIRE_LENGTH Access token lifetime in milliseconds 300000 (five minutes)
seatmap.security.rsa.private-key SEATMAP_SECURITY_RSA_PRIVATE_KEY Private key location classpath:certs/private-key.pem
seatmap.security.rsa.public-key SEATMAP_SECURITY_RSA_PUBLIC_KEY Public key location classpath:certs/public-key.pem
seatmap.security.sso.user-default-password SEATMAP_SECURITY_SSO_USER_DEFAULT_PASSWORD Default user password PASSWORD
seatmap.security.sso.external-public-key-url SEATMAP_SECURITY_SSO_EXTERNAL_PUBLIC_KEY_URL URL of the external public key https://apigw.piletilevi.test.helmes.ee/auth/public/key/

Google API key

An API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes.

Parameter Environment variable Description Default value
google.api.key GOOGLE_API_KEY API key value KEY_VALUE

First run settings

These settings will apply when you run the system for the first time.

Parameter Environment variable Description Default value
seatmap.first-run.organization SEATMAP_FIRST_RUN_ORGANIZATION Name of the first organization created seatmap.pro
seatmap.first-run.email SEATMAP_FIRST_RUN_EMAIL Super admin’s email admin@seatmap.pro
seatmap.first-run.super-admin SEATMAP_FIRST_RUN_SUPER_ADMIN Super admin’s login super@seatmap.pro
seatmap.first-run.password SEATMAP_FIRST_RUN_PASSWORD Super admin’s password PASSWORD

Password reset settings

Parameter Environment variable Description Default value
seatmap.reset.fromMail SEATMAP_RESET_FROMMAIL Email address from which to send a message to the user with a password reset link seatmap@seatmap.pro
seatmap.reset.token.expire-duration SEATMAP_RESET_TOKEN_EXPIRE_DURATION Link lifetime. Format: PTnHnMnS, where n is the relevant hours, minutes or seconds PT30M (thirty minutes)

Service settings

The URLs at which the services are located.

Parameter Environment variable Description Default value
seatmap.services.booking.url SEATMAP_SERVICES_BOOKING_URL Address of the booking service https://booking.seatmap.pro/
seatmap.services.metrics.url SEATMAP_SERVICES_METRICS_URL Address of the service to send service metrics to https://stat.seatmap.pro/editor-metrics
seatmap.services.editor.url SEATMAP_SERVICES_EDITOR_URL Address of the editor service http://localhost:3000/
seatmap.services.preview.url SEATMAP_SERVICES_PREVIEW_URL Address for the preview service http://localhost:5000/
seatmap.services.preview.path SEATMAP_SERVICES_PREVIEW_PATH Path for the preview service wconvert_pdf/

Mail settings

Email service parameters for restoring passwords.

Parameter Environment variable Description Default value
seatmap.mail.username SEATMAP_MAIL_USERNAME Username ${SEATMAP_MAIL_USERNAME:admin@seatmap.pro}
seatmap.mail.password SEATMAP_MAIL_PASSWORD Password ${SEATMAP_MAIL_PASSWORD:lir nyk blq hhu}
seatmap.mail.host SEATMAP_MAIL_HOST Host smtp.gmail.com
seatmap.mail.port SEATMAP_MAIL_PORT Port 587
seatmap.mail.socket.port SEATMAP_MAIL_SOCKET_PORT Socket port 465