Skip to content

Commit

Permalink
Build test express app
Browse files Browse the repository at this point in the history
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
jo12bar committed Jul 28, 2019
1 parent 119eca4 commit 4da77c2
Show file tree
Hide file tree
Showing 8 changed files with 525 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Log files
*.log

node_modules
20 changes: 20 additions & 0 deletions Dockerfile.template
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"]
Loading

0 comments on commit 4da77c2

Please sign in to comment.