This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2455d11
commit 8229eda
Showing
3 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM node:lts-buster | ||
|
||
# Install deps | ||
RUN apt-get update && apt-get install -y | ||
|
||
# Get dumb-init to allow quit running interactively | ||
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && chmod +x /usr/local/bin/dumb-init | ||
|
||
# Setup directories for the `node` user | ||
RUN mkdir -p /home/node/app/hop-relay-server/node_modules && chown -R node:node /home/node/app/hop-relay-server | ||
|
||
WORKDIR /home/node/app/hop-relay-server | ||
|
||
# Install node modules | ||
COPY package.json ./ | ||
# Switch to the node user for installation | ||
USER node | ||
RUN npm install --production | ||
|
||
# Copy over source files under the node user | ||
COPY --chown=node:node ./src ./src | ||
COPY --chown=node:node ./README.md ./ | ||
|
||
# Environment variables | ||
|
||
|
||
# hop-relay-server defaults to 15003 | ||
EXPOSE 15003 | ||
|
||
# metrics defaults to 8003 | ||
EXPOSE 8003 | ||
|
||
# Available overrides (defaults shown): | ||
# Server logging can be enabled via the DEBUG environment variable | ||
CMD [ "/usr/local/bin/dumb-init", "node", "src/server/bin.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