Skip to content
Merged
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
60 changes: 60 additions & 0 deletions benchkit/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM ubuntu:20.04

ARG NODE_VERSION=16
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS --max_old_space_size=4096 --use-openssl-ca

# Configuring NodeJS version
RUN apt-get clean

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl

RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION:=10}.x | sh

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
git \
curl \
python3 \
nodejs \
firefox \
wget \
nodejs \
unzip \
&& rm -rf /var/lib/apt/lists/*

RUN /bin/bash -c "hash -d npm"

# Enable tls v1.0
RUN echo "openssl_conf = openssl_configuration\n"|cat - /etc/ssl/openssl.cnf > /tmp/openssl_conf.cnf \
&& mv /tmp/openssl_conf.cnf /etc/ssl/openssl.cnf
RUN echo "[openssl_configuration]\n\
ssl_conf = ssl_configuration\n\
[ssl_configuration]\n\
system_default = tls_system_default\n\
[tls_system_default]\n\
CipherString = DEFAULT:@SECLEVEL=1" >> /etc/ssl/openssl.cnf

RUN update-ca-certificates --verbose

RUN useradd -m driver && echo "driver:driver" | chpasswd && adduser driver sudo
VOLUME /driver
RUN chown -Rh driver:driver /home/driver

USER driver
WORKDIR /home/driver
CMD /bin/bash
RUN mkdir /home/driver/.npm_global
RUN npm config set prefix /home/driver/.npm_global

# Build stuff
ADD --chown=driver:driver . /home/driver

RUN ls -lf ..
RUN npm ci
RUN npm run build

CMD ["npm", "run", "start-benchkit-backend"]
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@
"stop-neo4j": "lerna run stop-neo4j --scope neo4j-driver",
"start-testkit-backend": "lerna run start --scope testkit-backend --stream",
"start-testkit-backend::deno": "lerna run start::deno --scope testkit-backend --stream",
"start-benchkit-backend": "lerna run start --scope benchkit-backend --stream",
"lerna": "lerna",
"prepare": "husky install",
"lint-staged": "lint-staged",
"lint": "npm run lint::core && npm run lint::bolt-connection && npm run lint::bolt-connection && npm run lint::neo4j-driver-lite && npm run lint::neo4j-driver && npm run lint::testkit-backend",
"lint": "npm run lint::core && npm run lint::bolt-connection && npm run lint::bolt-connection && npm run lint::neo4j-driver-lite && npm run lint::neo4j-driver && npm run lint::testkit-backend && npm run lint::benchkit-backend",
"lint::core": "npm run ts-standard::core -- packages/core/src/ && npm run ts-standard::core -- packages/core/test/",
"lint::bolt-connection": "npm run ts-standard::bolt-connection -- packages/bolt-connection/types/ && npm run standard -- packages/bolt-connection/src/ && npm run standard -- packages/bolt-connection/test/",
"lint::neo4j-driver-lite": "npm run ts-standard::neo4j-driver-lite -- packages/neo4j-driver-lite/src/ && npm run ts-standard::neo4j-driver-lite -- packages/neo4j-driver-lite/test/",
"lint::neo4j-driver": "npm run ts-standard::neo4j-driver -- packages/neo4j-driver/types/ && npm run ts-standard::neo4j-driver -- packages/neo4j-driver/test/types/ && npm run standard -- packages/neo4j-driver/src/ && npm run standard -- packages/neo4j-driver/test/**/*.js",
"lint::testkit-backend": "npm run standard -- packages/testkit-backend/src/**/*.js",
"lint::benchkit-backend": "npm run standard -- packages/benchkit-backend/src/**/*.js",
"ts-standard": "npm run ts-standard::core && npm run ts-standard::bolt-connection && npm run ts-standard::neo4j-driver-lite && npm run ts-standard::neo4j-driver",
"ts-standard::core": "ts-standard --fix --project ./packages/core/tsconfig.json",
"ts-standard::bolt-connection": "ts-standard --fix --project ./packages/bolt-connection/tsconfig.json",
Expand Down
Loading