Deploying Containers on Docker
  • 13 Nov 2024
  • 2 Minutes to read
  • Dark
    Light

Deploying Containers on Docker

  • Dark
    Light

Article summary

This Document demonstrates how to host a Decisions Container on Docker using a YAML file.

Prerequisite:


Example YAML

Make changes to the configurations in the YAML file below, using the table as a reference guide.

version: "3.2"
services:
  decisions-1:
    container_name: Decisions
    hostname: Node
    image: "decisionscore/platform:latest" 					
    ports:
      - "8081:80"
    environment:
      - DECISIONS_DATABASETYPE=MSSQL
      - DECISIONS_DATABASECONNECTSTRING=Data Source=[systemIP];Initial Catalog=11_07;Integrated Security=false;User ID=[user];Password=[password];
      - DECISIONS_PORTALBASEURL=https://decisions.com
	  - DECISIONS_ADMINISTRATOR_EMAIL=email@decisions.com
      - DECISIONS_ADMINISTRATOR_PASSWORD=Roy@123
      - LANG=en_US.UTF-8
      - LANGUAGE=en_US:en
      - LC_ALL=en_US.UTF-8
      - DECISIONS_LICENSECOMPANYID=119eb5-17a8-11e6-xxx-xxxx	
      - DECISIONS_LICENSECOMPANYNAME=Decisions 				
      - DECISIONS_LICENSECONTACTEMAIL=john@email.com 		
      - DECISIONS_LICENSETYPE=EnterpriseNonProduction 		
    volumes:
      - ./filestorage:/opt/decisions/data

Variable

Description

container_name

The container will be created in Docker with this name.

hostname

The name of the server. This is needed to set the server name within Decisions.

image

Users can select the desired version of Decisions to be pulled from the Docker Repository. Container images of version 8.0 and above have been published to Docker Hub and are publicly available.

ports

By default, the container runs on port 80. Users can change the port if required.
8081 - this is the Host machine port number.
80 - this is the container's port number.

environment

Refer to the Decisions Environment Variables article to modify all the environment variables.

volumes

The default file storage location of the Decisions container is at /opt/decisions/data. Users must volume map this location with a physical file path to maintain persistent file storage.
If the volume is not modified in the YAML, the container will create a new folder for the file storage in the same directory where the YAML is saved.


Deploying YAML

  1. Save the updated YAML file to a location of your choice and name the file as docker-compose.yml.

  2. Open the Command Prompt as administrator and navigate to the file location where the YAML file is located.

  3. Run the command docker compose up. The image will get pulled, and the container will get hosted. Hosting the container may take some time, depending on the system configuration.

  4. The container will be ready and hosted after the status: Application started. Press Ctrl+C to shut down.

  5. Navigate to the browser and hit the URL: http://localhost:8082

  6. Your Decisions login window will appear.

  7. Login with the admin credentials given in the YAML file.


Server Name

To set the Server Name make sure that hostname: is added to the YAML file. Go to System > Administration > Servers.

Edit the Server and on the Edit Platform Server menu go to SERVER INFO and toggle the Sync Server And Machine Name setting. By default on a container this is enabled. When Sync Server and Machine Name is enabled the server name cannot be modified. Disable the setting and the server name can be changed.

The next time the Heartbeat Threadjob runs it will sync and overwrite the name if it has been changed manually.  


Description

Version

Release Date

Developer Task

Added in a new method for setting the server name on a container.

9.3

September 2024

[DT-041752]


Was this article helpful?