Skip to content

Commit

Permalink
Merge pull request #126 from bendhouseart/master
Browse files Browse the repository at this point in the history
[enh] Add Telemetry Service
  • Loading branch information
dlevitas authored Jul 15, 2024
2 parents 0cb4b0b + 9bcdcd7 commit 3cdcdb9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 12 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,15 @@ services:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
ports:
- 3000:3000 #vite wants to be exposed on the host for HMR?
- 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
15 changes: 15 additions & 0 deletions telemetry/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
5 changes: 5 additions & 0 deletions telemetry/telemetry.env
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 3cdcdb9

Please sign in to comment.