-
Notifications
You must be signed in to change notification settings - Fork 2
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
430cb89
commit 3b766d7
Showing
6 changed files
with
121 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
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,43 @@ | ||
# Use a builder | ||
FROM node:16-bookworm-slim as Builder | ||
LABEL maintainer="[email protected]" | ||
|
||
# git is required to pull some node packages from github | ||
RUN DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get --no-install-recommends --yes install \ | ||
ca-certificates git | ||
|
||
COPY . /opt/kalisio | ||
|
||
# Setup kli | ||
WORKDIR /opt/kalisio/kli | ||
RUN yarn install | ||
|
||
# Setup app | ||
WORKDIR /opt/kalisio/ | ||
RUN node /opt/kalisio/kli /opt/kalisio/kli.js --install | ||
|
||
# Copy to final container | ||
FROM node:16-bookworm-slim | ||
LABEL maintainer="[email protected]" | ||
|
||
ARG APP | ||
ARG FLAVOR | ||
ARG BUILD_NUMBER | ||
|
||
ENV BUILD_NUMBER=$BUILD_NUMBER | ||
ENV NODE_APP_INSTANCE=$FLAVOR | ||
|
||
COPY --from=Builder --chown=node:node /opt/kalisio /opt/kalisio | ||
# From now on, run stuff as 'node' | ||
USER node | ||
|
||
# Link the modules | ||
WORKDIR /opt/kalisio | ||
RUN node /opt/kalisio/kli /opt/kalisio/kli.js --link | ||
|
||
# Run the app | ||
WORKDIR /opt/kalisio/${APP} | ||
EXPOSE 8081 | ||
CMD [ "yarn", "prod" ] |
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,20 @@ | ||
# Ignore verything | ||
* | ||
|
||
# Except these | ||
!kli.js | ||
!kli/* | ||
!feathers-s3/* | ||
!feathers-import-export/* | ||
!feathers-webpush/* | ||
!kdk/* | ||
!kapp/* | ||
|
||
# But ignore these anyway | ||
**/node_modules | ||
**/npm-debug.log | ||
**/*Dockerfile | ||
**/docker-compose* | ||
**/*dockerignore | ||
**/.git | ||
**/.gitignore |
This file was deleted.
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