From d998307d86331e5f9c819384dbc5fd2d71f236a2 Mon Sep 17 00:00:00 2001 From: Anthony Galassi <28850131+bendhouseart@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:50:06 -0500 Subject: [PATCH 1/2] add telemetry --- docker-compose.yml | 9 ++++++++- telemetry/Dockerfile | 15 +++++++++++++++ telemetry/telemetry.env | 5 +++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 telemetry/Dockerfile create mode 100644 telemetry/telemetry.env diff --git a/docker-compose.yml b/docker-compose.yml index 763724a6..68c18582 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,4 +66,11 @@ services: healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000"] ports: - - 3000:3000 #vite wants to be exposed on the host for HMR? \ No newline at end of file + - 3000:3000 #vite wants to be exposed on the host for HMR? + + telemetry: + container_name: brainlife_ezbids-telemetry + build: ./telemetry + platform: linux/amd64 + ports: + - 8000:8000 #for local debugging \ No newline at end of file diff --git a/telemetry/Dockerfile b/telemetry/Dockerfile new file mode 100755 index 00000000..74e328e4 --- /dev/null +++ b/telemetry/Dockerfile @@ -0,0 +1,15 @@ +FROM neurodebian:nd20.04-non-free + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update && \ + apt-get update && apt-get upgrade -y + +RUN apt install -y parallel python3 python3-pip tree curl unzip git jq python libgl-dev python-numpy +RUN pip3 install --upgrade pip +RUN pip3 install conversiontelemetry +COPY telemetry.env /root/.telemetry.env + +ENTRYPOINT [ "start-telemetry" ] \ No newline at end of file diff --git a/telemetry/telemetry.env b/telemetry/telemetry.env new file mode 100644 index 00000000..cd0127a8 --- /dev/null +++ b/telemetry/telemetry.env @@ -0,0 +1,5 @@ +MONGO_DB_ADDRESS='127.0.0.1:27017' +MONGO_DB_USER='telemetry' +MONGO_DB_NAME='telemetry' +MONGO_DB_COLLECTION='telemetry' +TELEMETRY_RATE_LIMITING='False' \ No newline at end of file From 9bcdcd72d084f3340c6b3c9e48e4eef978f9c20b Mon Sep 17 00:00:00 2001 From: Anthony Galassi <28850131+bendhouseart@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:02:53 -0500 Subject: [PATCH 2/2] added profile for telemetry while under development --- dev.sh | 4 ++-- docker-compose.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dev.sh b/dev.sh index e561ff48..f14db884 100755 --- a/dev.sh +++ b/dev.sh @@ -30,8 +30,8 @@ npm run prepare-husky # ok docker compose is now included in docker as an option for docker if [[ $(command -v docker-compose) ]]; then # if the older version is installed use the dash - docker-compose up + docker-compose --profile development up else # if the newer version is installed don't use the dash - docker compose up + docker compose --profile development up fi diff --git a/docker-compose.yml b/docker-compose.yml index 68c18582..d14f100a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,9 +68,13 @@ services: ports: - 3000:3000 #vite wants to be exposed on the host for HMR? + # by default this is not enabled, need to run docker compose with --profile development to enable this service telemetry: container_name: brainlife_ezbids-telemetry build: ./telemetry platform: linux/amd64 + depends_on: + - mongodb + profiles: ["development"] ports: - 8000:8000 #for local debugging \ No newline at end of file