-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Dockerfile) adds docker file to containerized the example server (…
…#434) * feat(Dockerfile) adds docker file to containerized the example server Dockerizes the example server js for easier portability. Fixes a bug in server.js so that empty logs are no longer written out to the active JSON file buffer. * expose port --------- Co-authored-by: Jason Young <jason_y54@protonmail.com>
- Loading branch information
1 parent
01295de
commit 04cfcb1
Showing
2 changed files
with
18 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} | ||
FROM --platform=${BUILDPLATFORM} node:18-bullseye-slim AS flagon-node | ||
|
||
WORKDIR /app | ||
RUN --mount=type=bind,target=./package.json,src=./package.json \ | ||
--mount=type=bind,target=./package-lock.json,src=./package-lock.json \ | ||
npm ci | ||
COPY ./src src/ | ||
COPY ./example example/ | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["node", "example/server.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