-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcompose.yml
More file actions
160 lines (151 loc) · 5.33 KB
/
compose.yml
File metadata and controls
160 lines (151 loc) · 5.33 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# This is a Docker Compose file for the InfluxData documentation site.
## Run documentation tests for code samples.
name: influxdb3_plugins
services:
influxdb3-core:
container_name: plugins-core
image: influxdb:3-core
ports:
- ${INFLUXDB3_HOST_PORT:-8181}:${INFLUXDB3_CONTAINER_PORT:-8181}
env_file:
- .env.core
environment:
- PLUGIN_DIR=/host
- INFLUXDB3_CONTAINER_PORT=${INFLUXDB3_CONTAINER_PORT:-8181}
command:
- influxdb3
- serve
- --node-id=node0
- --log-filter=debug
- --object-store=file
- --data-dir=/var/lib/influxdb3/data
- --plugin-dir=/host
- --without-auth
- --http-bind=0.0.0.0:${INFLUXDB3_CONTAINER_PORT:-8181}
volumes:
- type: bind
source: .
target: /host
tmpfs:
- /var/lib/influxdb3/data:size=1g,mode=1777
influxdb3-enterprise:
container_name: plugins-enterprise
image: influxdb:3-enterprise
ports:
- ${INFLUXDB3_ENTERPRISE_HOST_PORT:-8182}:${INFLUXDB3_ENTERPRISE_CONTAINER_PORT:-8181}
env_file:
- .env.ent
environment:
- PLUGIN_DIR=/host
- INFLUXDB3_CONTAINER_PORT=${INFLUXDB3_ENTERPRISE_CONTAINER_PORT:-8181}
command:
- influxdb3
- serve
- --node-id=node0
- --log-filter=debug
- --object-store=file
- --data-dir=/var/lib/influxdb3/data
- --plugin-dir=/host
- --without-auth
- --http-bind=0.0.0.0:${INFLUXDB3_ENTERPRISE_CONTAINER_PORT:-8181}
volumes:
- type: bind
source: .
target: /host
tmpfs:
- /var/lib/influxdb3/data:size=1g,mode=1777
# Python test runner service (generic for both core and enterprise)
plugin-tester:
container_name: plugin-tester
build:
context: .
dockerfile: Dockerfile.test
environment:
- INFLUXDB3_HOST_URL=${INFLUXDB3_HOST_URL:-http://influxdb3-core:8181}
- INFLUXDB3_HOST_PORT=${INFLUXDB3_HOST_PORT:-8181}
- INFLUXDB3_CONTAINER_PORT=${INFLUXDB3_CONTAINER_PORT:-8181}
- INFLUXDB3_DATABASE_NAME=${INFLUXDB3_DATABASE_NAME:-testdb}
- PLUGIN_DIR=/plugins
- SKIP_CONTAINER_MANAGEMENT=true # Don't try to manage Docker from inside container
volumes:
- type: bind
source: .
target: /plugins
networks:
- default
command: ["python", "/plugins/test/test_plugins.py", "--help"]
# Test services for InfluxDB 3 Core
test-core-all:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-core
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-core:8181
- PLUGIN_DIR=/plugins
command: ["python", "/plugins/test/test_plugins.py", "influxdata", "--core", "--skip-container"]
test-core-specific:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-core
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-core:8181
- PLUGIN_DIR=/plugins
- PLUGIN_PATH=${PLUGIN_PATH:-influxdata/basic_transformation}
command: ["sh", "-c", "python /plugins/test/test_plugins.py \"${PLUGIN_PATH}\" --skip-container"]
test-core-toml:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-core
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-core:8181
- PLUGIN_PATH=${PLUGIN_PATH:-influxdata/basic_transformation}
- PLUGIN_FILE=${PLUGIN_FILE:-basic_transformation.py}
- TOML_CONFIG=${TOML_CONFIG:-}
- PACKAGES=${PACKAGES:-pint}
command: ["sh", "-c", "python /plugins/test/test_plugin_toml.py \"${PLUGIN_PATH}\" \"${PLUGIN_FILE}\" ${TOML_CONFIG:+--toml-config \"${TOML_CONFIG}\"} --packages ${PACKAGES}"]
# Test services for InfluxDB 3 Enterprise
test-enterprise-all:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-enterprise
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-enterprise:8181
- PLUGIN_DIR=/plugins
command: ["python", "/plugins/test/test_plugins.py", "influxdata", "--enterprise", "--skip-container"]
test-enterprise-specific:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-enterprise
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-enterprise:8181
- PLUGIN_DIR=/plugins
- PLUGIN_PATH=${PLUGIN_PATH:-influxdata/basic_transformation}
command: ["sh", "-c", "python /plugins/test/test_plugins.py \"${PLUGIN_PATH}\" --skip-container"]
test-enterprise-toml:
extends: plugin-tester
profiles: ["test"]
depends_on:
- influxdb3-enterprise
environment:
- INFLUXDB3_HOST_URL=http://influxdb3-enterprise:8181
- PLUGIN_PATH=${PLUGIN_PATH:-influxdata/basic_transformation}
- PLUGIN_FILE=${PLUGIN_FILE:-basic_transformation.py}
- TOML_CONFIG=${TOML_CONFIG:-}
- PACKAGES=${PACKAGES:-pint}
command: ["sh", "-c", "python /plugins/test/test_plugin_toml.py \"${PLUGIN_PATH}\" \"${PLUGIN_FILE}\" ${TOML_CONFIG:+--toml-config \"${TOML_CONFIG}\"} --packages ${PACKAGES}"]
# Markdown linting service
markdownlint:
container_name: markdownlint
image: davidanson/markdownlint-cli2
profiles: ["format"]
volumes:
- type: bind
source: .
target: /workspace
working_dir: /workspace
command: ["sh", "-c", "markdownlint-cli2 --config '{\"MD030\":{\"ul_single\":1,\"ol_single\":1,\"ul_multi\":1,\"ol_multi\":1}}' --fix '**/*.md' '!node_modules/**' '!.git/**'"]