-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #16
- Loading branch information
Showing
5 changed files
with
431 additions
and
1,604 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,30 @@ | ||
FROM node:20-alpine as build | ||
|
||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
COPY .babelrc .eslintrc nodemon.json package-lock.json package.json README.md ./ | ||
COPY build ./build/ | ||
COPY client ./client/ | ||
COPY server ./server/ | ||
|
||
RUN apk add zip | ||
RUN npm install --omit=dev | ||
RUN npm run build:client | ||
RUN node build/prepkg.js linux | ||
RUN pkg -t node18-linux-x64 -C Brotli --options max-old-space-size=4096,expose-gc -o dist/linux/inpx-web . | ||
|
||
# Build the prod image | ||
FROM alpine:latest | ||
|
||
# Move to /dist directory as the place for resulting binary folder | ||
WORKDIR /app | ||
RUN apk add libgcc libstdc++ gcompat | ||
RUN mkdir -m 0777 data | ||
COPY docker_entrypoint.sh entrypoint.sh | ||
COPY --from=build /app/dist/linux/inpx-web . | ||
|
||
EXPOSE 12380 | ||
|
||
HEALTHCHECK CMD curl --fail http://localhost:12380 || exit 1 | ||
|
||
ENTRYPOINT [ "/app/entrypoint.sh" ] |
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,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
OPTS="--lib-dir=/library --app-dir=/app/data" | ||
|
||
[ -z ${INDEX_FILE+x} ] || OPTS="$OPTS --inpx=\"${INDEX_FILE}\"" | ||
[ -z ${RECREATE+x} ] || OPTS="$OPTS --recreate" | ||
|
||
echo Starting ./inpx-web $OPTS | ||
./inpx-web $OPTS |
Oops, something went wrong.