Docker Compose
Deployment with Docker Compose
With Docker Compose you can deploy, orchestrate and scale TimeBase.
- Install Docker
- Install Docker Compose
- Login to registry.deltixhub.com:
docker login registry.deltixhub.com
Copy and create
docker-compose.yml
as defined belowRun docker compose:
docker-compose up -d
# docker-compose.yml Enterprise Edition example
version: "3"
services:
timebase:
image: "registry.deltixhub.com/quantserver.docker/timebase/server:5.6.68"
stop_grace_period: 5m
ulimits:
nofile:
soft: 65536
hard: 65536
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER}
- JAVA_OPTS=
-Xms8g
-Xmx8g
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/timebase-home/timebase.hprof
-Xlog:gc=debug:file=/timebase-home/GClog-TimeBase.log:time,uptime,level,tags:filecount=5,filesize=100m
ports:
- 8011:8011
volumes:
- "./timebase-home:/timebase-home"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8011/tb/ping || exit 1
timebase-admin:
image: "registry.deltixhub.com/quantserver.docker/timebase/ws-server:1.2.74"
environment:
- JAVA_OPTS=
-Xmx1g
-Dserver.port=8099
-Dtimebase.url=dxtick://timebase:8011
-Dserver.compression.enabled=true
-Dserver.compression.mime-types=text/html,text/css,application/javascript,application/json
ports:
- 8099:8099
depends_on:
- timebase
Configuration
You can configure TimeBase via Java system properties and in admin.properties configuration file.
Java system properties
You can configure TimeBase by passing Java environment variable as JAVA_OPTS
in docker-compose
file:
# Example
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER} # for Enterprise Edition
- JAVA_OPTS=
-Xms8g
-Xmx8g
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/timebase-home/timebase.hprof
admin.properties
You can configure selected TimeBase properties in admin.properties
configuration file and place it in timebase-home\config\
folder. In docker-compose.yml
, mount this folder to use admin.properties
configurations.
# Example
volumes:
- "./timebase-home:/timebase-home"
In admin.properties
you can configure host
, port
, version
, and other TimeBase parameters.
Example
# Example of admin.properties file
TimeBase.host=localhost
TimeBase.port=8011
TimeBase.version=5.0
TimeBase.enableRemoteAccess=true
Refer to enable SSl to learn how to enable SSL in admin.properties file.
TimeBase Deployment with SSL
Here is basic (minimal) instructions for TimeBase deployment with SSL
Docker Compose
Configure docker-compose.yml
file.
# docker-compose.yml Enterprise Edition example
version: "3"
services:
timebase:
image: "registry.deltixhub.com/quantserver.docker/timebase/server:5.6.68"
stop_grace_period: 5m
ulimits:
nofile:
soft: 65536
hard: 65536
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER}
- JAVA_OPTS=
-Xms8g
-Xmx8g
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/timebase-home/timebase.hprof
-Xlog:gc=debug:file=/timebase-home/GClog-TimeBase.log:time,uptime,level,tags:filecount=5,filesize=100m
ports:
- 8011:8011 //TimeBase Server port
- 8022:8022 //SSL port
volumes:
- "./timebase-home:/timebase-home"
timebase-admin:
image: "registry.deltixhub.com/quantserver.docker/timebase/ws-server:1.2.74"
environment:
- JAVA_OPTS=
-Xmx1g
-Dserver.port=8099
-Dtimebase.url=dxtick://timebase:8011
-Dserver.compression.enabled=true
-Dserver.compression.mime-types=text/html,text/css,application/javascript,application/json
ports:
- 8099:8099
depends_on:
- timebase
info
Refer to Enable SSL for additional information.
admin.properties
In admin.properties
configuration file specify the following parameters to enable SSL:
TimeBase.sslInfo=QSKeystoreInfo
TimeBase.sslInfo.keystoreFile=test.jks //security certificate file
TimeBase.sslInfo.keystorePass=<password>
TimeBase.enableSSL=true //enable SLL
TimeBase.sslInfo.sslPort=8022 //SSL port same as in docker-compose
TimeBase.sslInfo.sslForLoopback=false
Create a JKS file in case you use a self-signed certificate. Specify JKS file name for keystoreFile
and a password for keystorePass
.
info
Refer to Enable SSL for additional information.
TimeBase Deployment with UAC
In admin.properties
configuration file specify the following parameters to enable UAC:
QuantServer.security.rulesConfig=uac-access-rules.xml //users authorization information
QuantServer.security.userDirectoryConfig=uac-file-security.xml //users authentication information
QuantServer.security=FILE
info
Refer to User Access Control for additional information.
Useful Commands
docker-compose images
- show you component versions.docker-compose logs CONTAINER_NAME
- display log output from service.- Use
docker compose logs -f CONTAINER_NAME
to follow log output.