Dockerize
This commit is contained in:
parent
9a0d4e2261
commit
8f6a5aebb8
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM node:latest as builder
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:14
|
||||
RUN apt-get update && apt-get install -y ghostscript
|
||||
WORKDIR /usr/src/app
|
||||
COPY --from=builder /usr/src/app/package*.json ./
|
||||
COPY --from=builder /usr/src/app/build ./dist
|
||||
RUN npm install --only=production
|
||||
EXPOSE 3000
|
||||
CMD ["node", "dist/index.js"]
|
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "npx tsc && cp -r static/ build && node build/index.js",
|
||||
"build": "npx tsc && cp -r static/ views/ build"
|
||||
"build": "npx tsc && cp -r static/ views/ sh/ build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user