Skip to content

Configure Mideye with application-prod.yml

The Mideye Server uses a YAML file called application-prod.yml to store its configuration. This file contains values such as database connection strings, server ports, JWT token validity, and feature toggles.


Below is a complete example of application-prod.yml:

# ===================================================================
# Spring Boot configuration for the "prod" profile.
#
# This configuration overrides the application.yml file.
# ===================================================================
spring:
devtools:
restart:
enabled: false
livereload:
enabled: false
datasource:
type: com.zaxxer.hikari.HikariDataSource
# PLEASE NOTE:
# The database password must always be enclosed in single quotes (').
# If your password contains single quotes, double them:
# e.g., Pass''word123 for the password Pass'word123
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://localhost:1433;databaseName=MideyeServer_DB
username: "admin"
password: 'password'
hikari:
connection-test-query: SELECT 1
initializationFailTimeout: 10000
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jpa:
liquibase:
contexts: prod
mail:
host: localhost
port: 25
server:
port: 443
ssl:
key-store: C:\Program Files (x86)\Mideye Server 6\config\keystore.pfx
key-store-password: "your-password"
enabled: true
key-alias: webadmin
compression:
enabled: true
mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
min-response-size: 1024
jhipster:
http:
cache:
timeToLiveInDays: 1461
security:
authentication:
jwt:
# Token is valid 1 hour
token-validity-in-seconds: 3600
token-validity-in-seconds-for-remember-me: 3600
mail:
from: MideyeServer@localhost
base-url: http://my-server-url-to-change
logging:
logstash:
enabled: false
host: localhost
port: 5000
queue-size: 512
application:
switch-host: primary.mideye.com
switch-backup-host: secondary.mideye.com
switch-port: 202207
log-path: C:\Program Files (x86)\Mideye Server 6\log

The port is normally assigned during installation, but can be changed afterward.

  1. Open application-prod.yml:

    • Windows: C:\Program Files (x86)\Mideye Server 6\config\application-prod.yml
    • Linux: /opt/mideyeserver6/config/application-prod.yml
  2. Find the server section and change the port value:

server:
port: 443
ssl:
key-store: C:\Program Files (x86)\Mideye Server 6\config\keystore.pfx
key-store-password: "your-password"
enabled: true
key-alias: webadmin
  1. Restart the Mideye Server service.

The Self-Service Portal is disabled by default. To enable it, add use-self-service-portal: true to the application section:

application:
switch-host: primary.mideye.com
switch-backup-host: secondary.mideye.com
switch-port: 202207
log-path: C:\Program Files (x86)\Mideye Server 6\log
use-self-service-portal: true

Restart the Mideye Server service for the change to take effect.


To enable SSL, generate a certificate:

Terminal window
keytool -genkey -alias mideyeserver -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650

Then configure the server.ssl section accordingly. For detailed certificate management, see Certificate Management.


Starting with Mideye Server 6.2, the server automatically sends its information to the Mideye Switch.

To control this feature, add the following under the application section:

application:
switch-host: primary.mideye.com
switch-backup-host: secondary.mideye.com
switch-port: 202207
log-path: C:\Program Files (x86)\Mideye Server 6\log
server-info:
enabled: true
include-database-info: false