forked from yuzutech/kroki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support to render BPMN diagram via bpmn-js yuzutechGH-44
- Loading branch information
Showing
18 changed files
with
2,838 additions
and
15 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 @@ | ||
node_modules/ |
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,37 @@ | ||
# Package the Node.js project into a single binary | ||
FROM node:12.16.2-alpine3.11 as builder | ||
|
||
# Workaround: https://github.com/nodejs/docker-node/issues/813#issuecomment-407339011 | ||
# Error: could not get uid/gid | ||
# [ 'nobody', 0 ] | ||
RUN npm config set unsafe-perm true | ||
|
||
RUN npm install -g pkg pkg-fetch | ||
|
||
ENV NODE node10 | ||
ENV PLATFORM alpine | ||
ENV ARCH x64 | ||
RUN /usr/local/bin/pkg-fetch ${NODE} ${PLATFORM} ${ARCH} | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json /app/ | ||
COPY src /app/src | ||
|
||
RUN PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm ci | ||
|
||
RUN /usr/local/bin/pkg --targets ${NODE}-${PLATFORM}-${ARCH} . -o app.bin | ||
|
||
# Create the image | ||
FROM alpine:3.11.6 | ||
|
||
COPY --from=builder /app/app.bin /node/bin/bpmn | ||
COPY assets /app/assets | ||
ENV KROKI_MERMAID_PAGE_URL=file:///app/assets/index.html | ||
|
||
RUN apk add --no-cache --update chromium | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/lib/chromium/chrome | ||
|
||
EXPOSE 8002 | ||
|
||
ENTRYPOINT ["/node/bin/bpmn"] |
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,4 @@ | ||
default: | ||
|
||
package: | ||
docker build -t yuzutech/kroki-bpmn . |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<html> | ||
<body> | ||
<div id="container"></div> | ||
<script src="./bpmn-viewer.production.min.js" charset="utf-8"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.