-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcompose.yml
More file actions
111 lines (99 loc) · 4.21 KB
/
compose.yml
File metadata and controls
111 lines (99 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# Copyright © 2016-2026 by IntegrIT S.A. dba Hackolade. All rights reserved.
#
# The copyright to the computer software herein is the property of IntegrIT S.A.
# The software may be used and/or copied only with the written permission of
# IntegrIT S.A. or in accordance with the terms and conditions stipulated in
# the agreement/contract under which the software has been supplied.
#
# This file is an example of how to orchestrate the Hackolade CLI from a docker compose file
# leveraging our hck-cli docker image from Docker Hub
# This image contains the Hackolade Studio Release and all of the plugins already installed
# It's ready to be used.
#
# This compose.yml file is specifically designed for the pre-built hackolade/hck-cli image.
# For complete documentation and usage instructions, see: doc/getting-started-hck-cli.md
#
# If you are building your own image using hackolade/studio, use docker-compose.yml instead,
# which is designed for custom-built images. See doc/getting-started.md for building instructions.
services:
# Run a cli command (default to version)
# Pay attention to file paths as they must be paths inside the containers
# If a file needs to be made available from the host or another container, use the volumes section to mount the file or folders
# This compose exposes different manners to provide the License key or LicenseFile.xml for offline validation
# Example using online License key validation and the key stored in a secret file (file path from host) defined in the secrets section:
#
# docker compose run -t --rm validateKeyOnline
# docker compose run -t --rm hck-cli gendoc --format=HTML --model '/data/models/MongoDB/Yelp Challenge dataset.hck.json' --doc /data/output/doc-test --jsonSchema
hck-cli: &hck-cli
image: hackolade/hck-cli:8.9.2
command: ["version"]
restart: 'no'
# network_mode: 'none'
volumes:
- hackolade-studio-app-data:/home/hackolade/.config
- hackolade-studio-logs:/data/logs
- ${PWD}/models:/data/models
# - hackolade-studio-options:/data/options
- hackolade-studio-output:/data/output
showComputerIdForOfflineValidation:
extends: hck-cli
command: ["getComputerId"]
# validateKeyOfflineFromFile:
# extends: hck-cli
# network_mode: 'none'
# command:
# - validateKey
# - --file
# - /data/LicenseFile.xml
# volumes:
# - $HOME/Downloads/LicenseFile.xml:/data/LicenseFile.xml
# validateKeyOnlineFromFile:
# extends: hck-cli
# command:
# - validateKey
# - --key
# - /data/license-key.txt
# volumes:
# - $HOME/Downloads/license-key.txt:/data/license-key.txt
validateKeyOffline:
extends: hck-cli
network_mode: 'none'
command: ["validateKey"]
secrets:
- license_file
validateKeyOnline:
extends: hck-cli
command: ["validateKey"]
network_mode: host
secrets:
- license_key
installCustomCertificates:
image: hackolade/hck-cli:8.9.2
entrypoint: [ "bash", "-c" ]
command: ['update-ca-certificates']
restart: 'no'
# calling update-ca-certificates can only be done by root and will generate
# a new ca-certificates.crt file that will bundle all installed certificates
# in /etc/ssl/certs
user: root
volumes:
- installed-tls-certificates:/etc/ssl/certs
# - ./custom-certificate.crt:/etc/ssl/certs/custom-certificate.crt
# Bind or inject any other custom certificate into /etc/ssl/certs but without overriding everything!
volumes:
# This docker volume is mandatory if you want the licensing to work and be able to use the cli
hackolade-studio-app-data:
hackolade-studio-logs:
# This compose mounts the models folder from the host
# hackolade-studio-models:
# hackolade-studio-options:
hackolade-studio-output:
installed-tls-certificates:
secrets: # Don't change the name of the secrets as the cli is looking for them by name with these values by default
license_key:
# Expects the license key to be put as content of the file path defined in the file variable
file: ${HOME}/Downloads/license-key.txt
license_file:
# Expects the license file to be put as content of the file path defined in the file variable
file: ${HOME}/Downloads/LicenseFile.xml