-
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
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.
- Loading branch information
1 parent
01295de
commit 28415ab
Showing
2 changed files
with
16 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,11 @@ | ||
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/ | ||
|
||
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