Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ lib-cov
*.pid
*.gz
*.tgz
*.sh
*.tap
temp

Expand All @@ -18,7 +17,7 @@ results

npm-debug.log

node_modules
node_modules

GeoLite2-City.*

Expand Down
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 140,
"tabWidth": 4
}
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.15.3-alpine
FROM node:12.16-alpine

RUN apk add --no-cache git && \
rm -rf /var/lib/apt/lists/* /var/cache/apk /usr/share/man /tmp/*
Expand All @@ -13,14 +13,17 @@ RUN chown -R $app:$app /$app

USER $app

COPY --chown=$app:$app . /$app
# Use cached node_modules in case package.json doesn't change.
COPY package.json package-lock.json /$app/

RUN npm install

COPY --chown=$app:$app . /$app

HEALTHCHECK --interval=10s --timeout=5s --start-period=10s \
CMD curl --silent --fail http://localhost:3000/healthcheck \
|| exit 1
# This will run in k8s context so we use the heartbeat from there.
# HEALTHCHECK --interval=10s --timeout=10s --start-period=10s \
# CMD curl --silent --fail http://localhost:3000/healthcheck \
# || exit 1

EXPOSE 3000

Expand Down
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REGISTRY:=juandebravo
REGISTRY:=jitsi-dev
IMAGE:=rtcstats-server
REPOSITORY:=$(REGISTRY)/$(IMAGE)
TAG:=latest
Expand All @@ -9,16 +9,28 @@ build:
run:
@docker run \
-p 3000:3000 \
-p 8095:8095 \
$(REPOSITORY):$(TAG)

debug-restricted:
@docker run \
-p 3000:3000 \
-p 8095:8095 \
--env RTCSTATS_LOG_LEVEL=info \
--entrypoint npm \
--cpuset-cpus=0 \
$(REPOSITORY):$(TAG) \
run debug

debug:
@docker run \
-p 3000:3000 \
-p 8095:8095 \
-v $(PWD):/rtcstats-server \
-e DEBUG=true \
--entrypoint npm \
$(REPOSITORY):$(TAG) \
run watch:dev

push: build
@docker push $(REGISTRY)/$(IMAGE)
@echo "Push not configured."
#@docker push $(REGISTRY)/$(IMAGE)
306 changes: 0 additions & 306 deletions app.js

This file was deleted.

Loading