Deploy FrameworX using containers.
Reference → Solution → Deployment → Runtime | Server | Client Types | Container | Redundancy | Security
Container Deployment (Reference): Deploying FrameworX in Docker and Kubernetes environments.
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
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 |
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 | ||
---|---|---|
| ||
When accessing the container on Windows (Docker Desktop or similar), use the default bridge network—not
|
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
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... |
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:
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). |
When connecting to a container created with the twebservices image, you will see a screen like this:
In this screen:
Select the components you want to install.
Click Install Product.
This Docker image already includes Python 3.10.12. If you need additional libraries, you can install them or contact Tatsoft Support for assistance.
Since Docker works similarly to a virtual machine, the licensing procedure is almost the same.
Steps:
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"]
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.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:
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
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
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 .
yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: solutions-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
Variable | Description | Example |
---|---|---|
LICENSE_KEY | Product license | XXXX-XXXX-XXXX |
DB_CONNECTION | Database string | Server=db;Database=fx |
LOG_LEVEL | Logging level | Information |
TZ | Timezone | America/New_York |
dockerfile
HEALTHCHECK \
CMD curl -f http://localhost:10108/health || exit 1
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
yaml
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
Page Tree | ||
---|---|---|
|