-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
53 lines (51 loc) · 2.78 KB
/
docker-compose.yml
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
version: '3.6'
services:
configurator:
build:
context: ./assets/docker
dockerfile: Dockerfile
env_file:
- .env
container_name: configurator
depends_on:
splunk:
condition: service_healthy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
splunk:
image: "splunk/splunk:9.1.3"
platform: "linux/amd64"
container_name: splunk4viz
volumes:
# Mount a volume from your local app to the remote /etc/apps
# - ./packages/${APP_NAME}/stage:/opt/splunk/etc/apps/${APP_NAME}
# Mount a volume to retain any packaged apps locally in ./app_packages
# - ./app_packages:/opt/splunk/share/splunk/app_packages
# Mount output folder from local app to the remote /etc/apps
- ./packages/${APP_NAME}:/opt/splunk/etc/apps/${APP_NAME}
# Mount a volume to provide custom configurations to splunk-ansible
- ./assets/ansible/default.yml:/tmp/defaults/default.yml
# Mount the dependency app to be installed via REST by splunk-ansible (alternative to SPLUNK_APPS_URL usage)
# - './assets/apps/python-for-scientific-computing-for-linux-64-bit_420.tgz:/tmp/apps/python-for-scientific-computing-for-linux-64-bit_420.tgz'
# Mount a volume to make sure this dependency app can be installed by the configurator via CLI (for v4.2.0+)
# - './assets/apps/python-for-scientific-computing-for-linux-64-bit_420.tgz:/tmp/ansible/python-for-scientific-computing-for-linux-64-bit_420.tgz'
environment:
# This skips the license acceptance step
- SPLUNK_START_ARGS=--answer-yes --no-prompt --accept-license
# This pre-defines the admin password
- SPLUNK_PASSWORD=${SPLUNK_PASSWORD}
# This defines a tarball of apps to be pre-installed, you can
# also include multiple tarballs with comma-separated URLs
- SPLUNK_APPS_URL=https://splunkbase.splunk.com/app/2890/release/5.4.1/download,https://splunkbase.splunk.com/app/2882/release/4.1.2/download
# - SPLUNK_APPS_URL=/tmp/ansible/python-for-scientific-computing-for-linux-64-bit_420.tgz
- SPLUNKBASE_USERNAME=${SPLUNKBASE_USERNAME}
- SPLUNKBASE_PASSWORD=${SPLUNKBASE_PASSWORD}
ports:
- 8000:8000 # for web/browser access
- 8089:8089 # for REST API access
healthcheck:
# This tells Docker whether our Splunk container has MLTK toolkit installed
test: ['CMD', 'curl', '-f', '-k', '-u', 'admin:${SPLUNK_PASSWORD}', 'https://localhost:8089/services/apps/local/Splunk_ML_Toolkit']
interval: 10s
timeout: 5s
retries: 50