Created
September 26, 2019 13:09
-
-
Save svenvarkel/508588dd62b660700b05e7da8ef99e40 to your computer and use it in GitHub Desktop.
Dockerfile for SailsJS project
This file contains hidden or 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
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