mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
add dockerfile
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# Use the official lightweight Node.js 12 image.
|
||||
# https://hub.docker.com/_/node
|
||||
FROM node:14-slim
|
||||
|
||||
# Create and change to the app directory.
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy application dependency manifests to the container image.
|
||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
|
||||
# Copying this separately prevents re-running npm install on every code change.
|
||||
COPY package*.json ./
|
||||
|
||||
# Install production dependencies.
|
||||
RUN npm install --only=production
|
||||
|
||||
# Copy local code to the container image.
|
||||
COPY . ./
|
||||
|
||||
# Run the web service on container startup.
|
||||
CMD [ "npm", "start" ]
|
||||
@@ -12,8 +12,8 @@
|
||||
"start:dev:no-hot-reload": "NODE_ENV=development && node index.js",
|
||||
"start:dev:windows": "SET NODE_ENV=development && nodemon index.js",
|
||||
"start:dev:windows:no-hot-reload": "SET NODE_ENV=development && node index.js",
|
||||
"start": "NODE_ENV=production node index.js -- loglevel=info",
|
||||
"start:windows": "SET NODE_ENV=production && node index.js -- loglevel=warn port=8080",
|
||||
"start": "NODE_ENV=production node index.js -- loglevel=debug",
|
||||
"start:windows": "SET NODE_ENV=production && node index.js -- loglevel=debug port=8080",
|
||||
"test": "jasmine && karma start --single-run --browsers ChromeHeadless karma.conf.js",
|
||||
"test:unit": "jasmine",
|
||||
"test:e2e": "karma start --single-run --browsers ChromeHeadless karma.conf.js"
|
||||
|
||||
Reference in New Issue
Block a user