Skip to content

Instantly share code, notes, and snippets.

@svenvarkel
Created September 26, 2019 13:09
Show Gist options
  • Save svenvarkel/508588dd62b660700b05e7da8ef99e40 to your computer and use it in GitHub Desktop.
Save svenvarkel/508588dd62b660700b05e7da8ef99e40 to your computer and use it in GitHub Desktop.
Dockerfile for SailsJS project
FROM node:10
# Set the workdir /var/www/myapp
WORKDIR /var/app/current
# Copy the package.json to workdir
COPY package.json ./
COPY package-lock.json ./
# Copy application source
COPY .sailsrc ./
COPY app.js ./
COPY api ./
COPY assets ./
COPY config ./
COPY test ./
COPY views ./
# Run npm install - install the npm dependencies
RUN npm i
# Expose application ports - 1337 for Sails.JS app and 9337 for debugger
EXPOSE 1337
EXPOSE 9337
# Start the application
CMD ["npm", "run", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment