2024-04-01 17:17:07 +00:00
|
|
|
# This is a Docker Compose file for the InfluxData documentation site.
|
|
|
|
## Run documentation tests for code samples.
|
2024-06-21 23:41:07 +00:00
|
|
|
name: influxdata-docs
|
2024-07-30 15:00:14 +00:00
|
|
|
secrets:
|
|
|
|
influxdb2-admin-username:
|
|
|
|
file: ~/.env.influxdb2-admin-username
|
|
|
|
influxdb2-admin-password:
|
|
|
|
file: ~/.env.influxdb2-admin-password
|
|
|
|
influxdb2-admin-token:
|
|
|
|
file: ~/.env.influxdb2-admin-token
|
2023-09-26 19:56:21 +00:00
|
|
|
services:
|
2024-04-01 17:17:07 +00:00
|
|
|
local-dev:
|
2024-07-23 20:08:28 +00:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile_inline: |
|
|
|
|
FROM hugomods/hugo:exts-0.123.8
|
|
|
|
RUN apk add --no-cache curl openssl
|
2024-04-01 17:17:07 +00:00
|
|
|
command: hugo server --bind 0.0.0.0
|
2024-07-23 20:08:28 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:1313/influxdb/cloud-dedicated/"]
|
|
|
|
interval: 1m
|
|
|
|
timeout: 10s
|
|
|
|
retries: 2
|
|
|
|
start_period: 40s
|
|
|
|
start_interval: 5s
|
2024-04-01 17:17:07 +00:00
|
|
|
ports:
|
|
|
|
- 1313:1313
|
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: "$PWD"
|
|
|
|
target: /src
|
|
|
|
- type: bind
|
|
|
|
source: $HOME/hugo_cache
|
|
|
|
target: /tmp/hugo_cache
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- local
|
|
|
|
- lint
|
|
|
|
cloud-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: cloud-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/influxdb/cloud/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/influxdb/cloud
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
- v2
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/cloud/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: cloud-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
|
|
|
cloud-dedicated-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: cloud-dedicated-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/influxdb/cloud-dedicated/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/influxdb/cloud-dedicated
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
- v3
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/cloud-dedicated/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# The following mount assumes your influxctl configuration file is located at ./content/influxdb/cloud-dedicated/config.toml.
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/cloud-dedicated/config.toml
|
|
|
|
target: /root/.config/influxctl/config.toml
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: cloud-dedicated-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
|
|
|
cloud-serverless-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: cloud-serverless-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/influxdb/cloud-serverless/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/influxdb/cloud-serverless
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
- v3
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/cloud-serverless/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: cloud-serverless-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
|
|
|
clustered-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: clustered-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/influxdb/clustered/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/influxdb/clustered
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
- v3
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/clustered/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# The following mount assumes your influxctl configuration file is located at ./content/influxdb/clustered/config.toml.
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/clustered/config.toml
|
|
|
|
target: /root/.config/influxctl/config.toml
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: clustered-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
|
|
|
telegraf-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: telegraf-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/telegraf/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/telegraf
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/telegraf/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: telegraf-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
|
|
|
v2-pytest:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: v2-pytest
|
2024-07-23 20:08:28 +00:00
|
|
|
image: influxdata/docs-pytest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.pytest
|
|
|
|
entrypoint:
|
|
|
|
- /bin/bash
|
|
|
|
- /src/test/scripts/run-tests.sh
|
|
|
|
- pytest
|
|
|
|
command:
|
|
|
|
# In the command, pass file paths to test.
|
|
|
|
# The container preprocesses the files for testing and runs the tests.
|
|
|
|
- content/influxdb/v2/**/*.md
|
2024-08-07 18:55:26 +00:00
|
|
|
environment:
|
|
|
|
- CONTENT_PATH=content/influxdb/v2
|
2024-07-23 20:08:28 +00:00
|
|
|
profiles:
|
|
|
|
- test
|
|
|
|
- v2
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
volumes:
|
|
|
|
# Site configuration files.
|
|
|
|
- type: bind
|
|
|
|
source: .
|
|
|
|
target: /src
|
|
|
|
read_only: true
|
|
|
|
# Files shared between host and container and writeable by both.
|
|
|
|
- type: bind
|
|
|
|
source: ./test/shared
|
|
|
|
target: /shared
|
|
|
|
- type: bind
|
|
|
|
source: ./content/influxdb/v2/.env.test
|
|
|
|
target: /app/.env.test
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/data/<FILE.lp>` or `data/<FILE.lp>` to access sample data files from the `static/downloads` directory.
|
|
|
|
- type: bind
|
|
|
|
source: ./static/downloads
|
|
|
|
target: /app/data
|
|
|
|
read_only: true
|
|
|
|
# In your code samples, use `/app/iot-starter` to store example modules or project files.
|
|
|
|
- type: volume
|
|
|
|
source: v2-tmp
|
|
|
|
target: /app/iot-starter
|
|
|
|
# Target directory for the content under test.
|
|
|
|
# Files are copied from /src/content/<productpath> to /app/content/<productpath> before running tests.
|
|
|
|
- type: volume
|
|
|
|
source: test-content
|
|
|
|
target: /app/content
|
|
|
|
working_dir: /app
|
2024-07-30 15:00:14 +00:00
|
|
|
influxdb2:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: influxdb2
|
2024-07-30 15:00:14 +00:00
|
|
|
image: influxdb:2
|
|
|
|
ports:
|
|
|
|
- 8086:8086
|
|
|
|
environment:
|
|
|
|
DOCKER_INFLUXDB_INIT_MODE: setup
|
|
|
|
DOCKER_INFLUXDB_INIT_USERNAME_FILE: /run/secrets/influxdb2-admin-username
|
|
|
|
DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influxdb2-admin-password
|
|
|
|
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/influxdb2-admin-token
|
|
|
|
DOCKER_INFLUXDB_INIT_ORG: docs
|
2024-08-07 18:55:26 +00:00
|
|
|
DOCKER_INFLUXDB_INIT_BUCKET: get-started
|
|
|
|
INFLUX_ORG: docs
|
|
|
|
INFLUX_BUCKET: get-started
|
2024-07-30 15:00:14 +00:00
|
|
|
profiles:
|
|
|
|
- v2
|
|
|
|
- local
|
|
|
|
secrets:
|
|
|
|
- influxdb2-admin-username
|
|
|
|
- influxdb2-admin-password
|
|
|
|
- influxdb2-admin-token
|
|
|
|
volumes:
|
|
|
|
- type: volume
|
|
|
|
source: influxdb2-data
|
|
|
|
target: /var/lib/influxdb2
|
|
|
|
- type: volume
|
|
|
|
source: influxdb2-config
|
|
|
|
target: /etc/influxdb2
|
2024-07-30 15:07:46 +00:00
|
|
|
remark-lint:
|
2024-08-26 21:32:16 +00:00
|
|
|
container_name: remark-lint
|
2024-07-30 15:07:46 +00:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: .ci/Dockerfile.remark
|
|
|
|
profiles:
|
|
|
|
- lint
|
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: ./content
|
|
|
|
target: /app/content
|
2024-07-23 20:08:28 +00:00
|
|
|
volumes:
|
|
|
|
test-content:
|
|
|
|
cloud-tmp:
|
|
|
|
cloud-dedicated-tmp:
|
|
|
|
cloud-serverless-tmp:
|
|
|
|
clustered-tmp:
|
|
|
|
telegraf-tmp:
|
|
|
|
v2-tmp:
|