-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add and use adapter-node for docker builds * Docker build and run support * Ignore build dir * npm install to sync package-lock.json * Command for local docker run
- Loading branch information
Showing
9 changed files
with
344 additions
and
53 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,3 @@ | ||
# Copied in from: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/#dockerignore-file | ||
node_modules | ||
npm-debug.log |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ node_modules | |
.env | ||
static/smui-dark.css | ||
static/smui.css | ||
build |
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,19 @@ | ||
FROM node:14-alpine | ||
|
||
WORKDIR /app | ||
|
||
# Install required deps | ||
COPY package.json package-lock.json ./ | ||
RUN npm ci | ||
|
||
# Copy in source and build the app | ||
COPY . . | ||
RUN npm run build-docker | ||
|
||
EXPOSE 3000 | ||
|
||
# Wrap Node.js with Tini since it wasn't designed to be run as PID 1 | ||
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals | ||
RUN apk add --no-cache tini | ||
ENTRYPOINT ["tini", "--"] | ||
CMD ["node", "./build"] |
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
Oops, something went wrong.