Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Deploy FrameworX using containers.

Reference  Solution  Deployment Runtime | Server | Client Types | Container | Redundancy | Security


Container Deployment (Reference): Deploying FrameworX in Docker and Kubernetes environments.

Parent Page: Deployment (Reference)

On this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone


Downloading the Image

To download the desired image, with the container platform running, use the following commands:

  • Full Build (frameworx):

    Code Block
    docker pull tatsoftdockerhub/frameworx:latest


  • TWebServer Only (twebservices):

    Code Block
    docker pull tatsoftdockerhub/twebservices:latest


Creating a Container

After downloading the image, create a container using the command below:

Code Block
docker run -it --name <ContainerName> --network <networktype> --mount type=bind,source="<path to data folder>",target=/Documents <ImageName>

Parameters:

-it = Enables an interactive terminal.

--network <networktype>Defines how the network is set up: host, bridge...

--mount type=bind = Binds the container’s /Documents directory (where FrameworX stores project files and data) to a folder on your host machine. This ensures your data persists even if the container is removed — container data is otherwise volatile.

source="<path to data folder>" = Folder path created locally.

Note: the folder in the host system needs to be created by the user.
Example:
If your desired host folder is /home/username/FX_Data, use the command below:

Code Block
docker run -it --name fx-server --network host --mount type=bind,source="/home/username/FX_Data",target=/Documents tatsoftdockerhub/frameworx:latest


Info
titleFor Windows (Docker Desktop or similar)

When accessing the container on Windows (Docker Desktop or similar), use the default bridge network—not host—and map ports 10108 and 3101. Then, in Solution Manager, connect to localhost (127.0.0.1); it will route to the Docker container via the mapped ports. Example:

Code Block
docker run -p 10108:10108 -p 3101:3101 -it --name fx-server --mount type=bind,source="C:\Users\eduar\Documents\Docker",target=/Documents tatsoftdockerhub/frameworx:latest



Or, if you are using TWebServices Image:

Code Block
docker run -it --name fx-server --network host --mount type=bind,source="/home/username/FX_Data",target=/Documents tatsoftdockerhub/twebservices:latest


This will:

  • Create a container named fx-server

  • Use the full product image

  • Share project data between the container and the local /home/username/FX_Data folder

  • Run the container

Starting an existing container

To start a previously created and stopped container, use:

Code Block
docker start -ia <ContainerName>

Parameters
-ia =>
Starts the container in interactive mode and attaches to the terminal.

Expected Output

When the container starts, you should see output similar to this:

Code Block
user@userNote:~$ docker start -ia fx-server
04/02/2025 13:12:07.579 - Starting service - Port: 10108...
04/02/2025 13:12:07.686 - TWebServices was started - Port: 10108, Local IPs: 127.0.1.1,172.29.170.103,172.17.0.1...
04/02/2025 13:12:07.691 - Type 'exit' or 'quit' to finish...


Connecting from Windows (frameworx Image)

Start the Solution Manager on a Windows computer, configure the 'Remote Server' with the IP address shown in the Linux terminal, then click Connect, as shown below:
Image Added
You can upload a solution to the Linux server, by clicking Upload File.

Info

When using Docker Desktop or a similar tool, connect to localhost (127.0.0.1:10108).


Connecting from Windows (twebservices Image)

When connecting to a container created with the twebservices image, you will see a screen like this:

Image Added

In this screen:

  1. Select the components you want to install.

  2. Click Install Product.


Additional Feature

This Docker image already includes Python 3.10.12. If you need additional libraries, you can install them or contact Tatsoft Support for assistance.


Licensing

Since Docker works similarly to a virtual machine, the licensing procedure is almost the same.

Steps:

  1. Set up a License Server
    Instructions can be found at this link.
  2. On the client side, the only difference is the location of the folder where the RemoteLicenseService.config file should be placed.
    If you’re following the example on the referenced page, you’ll have a shared folder with the container located at:
    /home/username/FX_Data
    The RemoteLicenseService.config file must be placed in the following path:
    /home/username/FX_Data/FrameworX/MachineSettings
    Note: The /FrameworX/MachineSettings folder is created automatically after the container is run for the first time.

Docker Deployment

Base Image Creation

Dockerfile:

dockerfile

FROM mcr.microsoft.com/dotnet/runtime:8.0

# Install dependencies
RUN apt-get update && apt-get install -y \
    libicu-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Copy runtime files
COPY ./net8.0 /app
WORKDIR /app

# Set permissions
RUN chmod +x TServer.exe TWebServices.exe

# Expose ports
EXPOSE 10108

# Set entry point
ENTRYPOINT ["./TServer.exe"]
CMD ["/solution:MySolution.tproj"]

Build and Run

bash

# Build image
docker build -t frameworkx:10.1 .

# Run container
docker run -d \
  --name frameworkx-runtime \
  -p 10108:10108 \
  -v /host/solutions:/app/solutions \
  -v /host/data:/app/data \
  frameworkx:10.1

Docker Compose

Multi-Container Setup

docker-compose.yml:

yaml

version: '3.8'

services:
  frameworkx:
    image: frameworkx:10.1
    ports:
      - "10108:10108"
    environment:
      - LICENSE_KEY=${LICENSE_KEY}
      - DB_CONNECTION=Server=database;Database=fx
    volumes:
      - solutions:/app/solutions
      - data:/app/data
    depends_on:
      - database
    restart: unless-stopped

  database:
    image: mcr.microsoft.com/mssql/server:2019-latest
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=${DB_PASSWORD}
    volumes:
      - dbdata:/var/opt/mssql
    ports:
      - "1433:1433"

volumes:
  solutions:
  data:
  dbdata:

Kubernetes Deployment

Deployment Manifest

frameworkx-deployment.yaml:

yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: frameworkx-runtime
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frameworkx
  template:
    metadata:
      labels:
        app: frameworkx
    spec:
      containers:
      - name: frameworkx
        image: frameworkx:10.1
        ports:
        - containerPort: 10108
        env:
        - name: LICENSE_KEY
          valueFrom:
            secretKeyRef:
              name: frameworkx-secrets
              key: license-key
        volumeMounts:
        - name: solutions
          mountPath: /app/solutions
        - name: data
          mountPath: /app/data
      volumes:
      - name: solutions
        persistentVolumeClaim:
          claimName: solutions-pvc
      - name: data
        persistentVolumeClaim:
          claimName: data-pvc

Service Configuration

frameworkx-service.yaml:

yaml

apiVersion: v1
kind: Service
metadata:
  name: frameworkx-service
spec:
  selector:
    app: frameworkx
  ports:
    - protocol: TCP
      port: 10108
      targetPort: 10108
  type: LoadBalancer

Persistent Storage

Docker Volumes

bash

# Create named volumes
docker volume create frameworkx-solutions
docker volume create frameworkx-data

# Backup volumes
docker run --rm \
  -v frameworkx-solutions:/source \
  -v /backup:/backup \
  alpine tar czf /backup/solutions.tar.gz -C /source .

Kubernetes PVC

yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: solutions-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

Container Configuration

Environment Variables

VariableDescriptionExample
LICENSE_KEYProduct licenseXXXX-XXXX-XXXX
DB_CONNECTIONDatabase stringServer=db;Database=fx
LOG_LEVELLogging levelInformation
TZTimezoneAmerica/New_York

Health Checks

dockerfile

HEALTHCHECK --interval=30s --timeout=3s \
  CMD curl -f http://localhost:10108/health || exit 1

Orchestration

Auto-Scaling

yaml

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: frameworkx-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: frameworkx-runtime
  minReplicas: 1
  maxReplicas: 5
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70

Rolling Updates

yaml

spec: strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0

In this section...

Page Tree
93DRAF
root@parentspaces