-
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.
Just so I can test the basic functionality of balena. Based off of https://github.com/balena-io-projects/simple-server-node/
- Loading branch information
Showing
8 changed files
with
525 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,4 @@ | ||
# Log files | ||
*.log | ||
|
||
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,20 @@ | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:10-stretch-run | ||
|
||
# Defines our working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json AND package-lock.json into the container first | ||
COPY package*.json ./ | ||
|
||
# Installs npm dependencies on the balena build server, making sure to clean up | ||
# the artifacts it creates in order to reduce the image size | ||
RUN JOBS=MAX npm install --production --unsafe-perm && npm cache verify && rm -rf /tmp/* | ||
|
||
# Copy all files in our root to the container's working directory | ||
COPY . ./ | ||
|
||
# Enable udevd so that plugged dynamic hardware devices can show up in our container | ||
ENV UDEV=1 | ||
|
||
# server.js will run when container starts up on the device | ||
CMD ["npm", "start"] |
Oops, something went wrong.