Sign inSign up

smatechnologies/opcon-server

By smatechnologies

•Updated 3 months ago

OpCon Server

Image
4

100K+

smatechnologies/opcon-server repository overview

⁠About this image

Official container images for OpCon Server by SMA Technologies.

⁠How to use this image

⁠Docker Compose

docker-compose is a utility that can be used to create the entire environment in which multiple dependent applications can run within their own containers. In the case of OpCon, a full environment would be to run OpCon services in one container (this image) and run SQL Server in another container. With a docker compose file, you can run the environment easily with one short command: docker-compose up

A sample docker compose file⁠ shows this. Docker compose documentation is available here⁠.

⁠Configuration

⁠Requirements

  • This is a Linux image on Ubuntu, which can be run on Linux systems or Windows 10+ (desktop) where Docker is supported.

    • NOTE: Running the image on Windows Server is currently not supported in production environments because Docker has some restrictions.
  • This image requires Docker Engine 18.06.0+.

  • It requires the following environment variables

    DB_SERVER_NAME=<SQL Server Name>

    DATABASE_NAME=<OpCon Database Name>

    DB_USER_NAME=<SQL User used by OpCon>

    DB_PASSWORD=<SQL User's password>

    REPORTING_DB_SERVER_NAME=<Reporting SQL Server Name>

    REPORTING_DATABASE_NAME=<Reporting Database Name>

    REPORTING_DB_USER_NAME=<SQL User used by the reporting service>

    REPORTING_DB_PASSWORD=<Reporting SQL User's password>

⁠Environment Variables

You can set the following environment variables to configure how the image will run (NOTE: also add reporting env variables from above):

  • Database Connection Settings

    • DB_SERVER_NAME: The SQL Server host name used in the connection string.

    Default: None (it is required)

    • DATABASE_NAME: The OpCon Database name.

    Default: None (it is required)

    • DB_USER_NAME: The SQL user used by OpCon to communicate with the database. Usually, this is "opconsam" but it can be something else when using a different database and so must be provided. NOTE: This value must be "opconsam" if you wish to create a new SQL Server user for OpCon. If you already have a SQL user for OpCon created, only then you may specify that user for this environment variable.

    Default: None (it is required)

    • DB_PASSWORD: The SQL user's password.

    Default: None (it is required)

    • DB_CONFIGURATION: Additional database settings - Allowed values are AlwaysON, Mirroring or None.

    Default: None

  • Database Upgrade Settings

    • SQL_ADMIN_USER: The SQL user that will be used to create/upgrade the database and create the SQL user that will be used by OpCon.

    Default: None

    • SQL_ADMIN_PASSWORD: The SQL admin user's password.

    Default: None

    • DB_LOGICAL_DATA_FILENAME: Database file name. Note that the default name has "OpConxps" in it, which means if you use "OpConxps" database, you need not provide this environment variable. However, if you use a different database name, and need to change the database file name accordingly, you must set this value.

    Default: OpConxps_Data

    • PATH_TO_DATABASE_DATA_FILE: Path to the database file. Note that the path is a Windows path. This is because by default SQL Server is assumed to be on a Windows machine. If you run SQL Server on Linux, please use the appropriate path on Linux. Also, note that the default path has "OpConxps" in it, which means if you use "OpConxps" database, you need not provide this environment variable. However, if you use a different database name, and need to change the database file path accordingly, you must set this value.

    Default: C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\OpConxps_Data.MDF

    • DB_LOGICAL_LOG_FILENAME: Database log file name. Note that the default name has "OpConxps" in it, which means if you use "OpConxps" database, you need not provide this environment variable. However, if you use a different database name, and need to change the database file name accordingly, you must set this value.

    Default: OpConxps_Log

    • PATH_TO_DATABASE_LOG_FILE: Path to the database log file. Note that the path is a Windows path. This is because by default SQL Server is assumed to be on a Windows machine. If you run SQL Server on Linux, please use the appropriate path on Linux. Also, note that the default path has "OpConxps" in it, which means if you use "OpConxps" database, you need not provide this environment variable. However, if you use a different database name, and need to change the database file path accordingly, you must set this value.

    Default: C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\OpConxps_Log.LDF

  • SMTP Settings

    • SMTP_SERVER_NAME: SMTP Server name. This is used by OpCon's notification system to send email messages.

    Default: None

    • NOTIFY_EMAIL_ADDRESS: Email address where notification will go to. This is used by OpCon's notification system to send email messages.

    Default: None

    • NOTIFY_DOMAIN_NAME: Domain name to be used in the "from email" field . This is used by OpCon's notification system to send email messages.

    Default: None

  • OpCon API Settings

    • CREATE_API_CERTIFICATE: Specifies if the container should create a self signed certificate to be used by OpCon's Rest API service before starting up. If this is not provided, and you intend to use TLS, then you must provide the certificate path and password, so the API can access the certificate and use it. NOTE: Starting with OpCon version 20.00.00, the API will always use TLS for communication so a self-signed or custom certificate must be used.

    Default: false

    • API_CERTIFICATE_PATH: If you don't wish to create a self signed certificate, then this variable provides the full path where the certificate file (.pfx) is, so the API can use it.

    Default: None

    • API_CERTIFICATE_PASSWORD: The password to access the certificate file (.pfx) is, so the API can use it.

    Default: None

  • Container Commands

    • DB_SETUP: Specifies if a database upgrade should be run. Usually, DB update should be run, unless there are no database changes required between the current OpCon version and the version you plan to go to. Allowed values are false (don't run an upgrade), true (run an update only if the database is not already at the correct version) and force (run an upgrade even if database is at the correct version).

    Default: false

    • ENABLE_LDAPMON: Specifies if the LDAPMon service should be enabled when running the container. This service synchronizes LDAP users and groups with OpCon users and roles.

    Default: false

    • NO_RUN: Specifies if OpCon services should start up. This may be set to true if you only want to upgrade the database but not yet start OpCon services.

    Default: false

  • Miscellaneous

    • TZ: Time zone setting for the container. E.g.: America/Chicago (See time zone list⁠)

    Default: UTC

    • LANG: Locale setting for the container. E.g.: fr_FR.utf-8

    Default: UTC

    • LICENSE: License information for the environment, provided in {filename}:{file contents} format. Please see our instructions for how to generate this value here⁠. Alternatively, the actual license file may be provided in the mounted volume for /app/config and will be recognized when starting the image.

    Default: None

⁠Miscellaneous Information

  • If you need to install custom certificates in the container, please copy them in .crt format to a location on the host (or docker volume) and mount it in the container at "/app/certs" while running the container. They will all be copied over in the container and will be trusted before starting OpCon services.

  • To stop the container use a 30 second timeout for all services to gracefully shutdown (E.g.: docker stop -t 30 opcon-server)

  • If you run the image and stop it and then restart it, please note that settings already applied during the first run will not be re-applied again. This means if you manually update any config files between runs, the modified settings will stay for the subsequent runs. The only time they will be overwritten is if you run a new instance of the image.

* Ubuntu 18.04 is LTS

⁠Resources

Some extra information and how-to samples are provided on Github⁠

Tag summary

Content type

Image

Digest

sha256:ba40b4961…

Size

377.4 MB

Last updated

5 months ago

docker pull smatechnologies/opcon-server