Trying to get docker to work

This commit is contained in:
2021-02-04 04:17:39 +11:00
parent 534856ed1f
commit 68751fcd6c
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
FROM node:15
# Change working directory
WORKDIR "/app"
# Copy package.json and package-lock.json
COPY package*.json ./
# Install npm production packages
RUN npm install --production
COPY . /app
EXPOSE 3100
USER node
ENTRYPOINT ["npm", "start"]
+1 -1
View File
@@ -4,7 +4,7 @@
"description": "An API centric news server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js",
"scripts": {
"start": "pm2 start server/server.js --watch",
"start": "node server/server.js",
"dev": "npm run watch:server",
"watch:server": "nodemon . --ext js,jsx,json --ignore 'node_modules/*'"
},