Fix docker build

This commit is contained in:
schmelczerandras 2020-10-22 22:22:05 +02:00
parent 0058f40f1f
commit 938e7f3c36
2 changed files with 3 additions and 18 deletions

View file

@ -1,23 +1,8 @@
FROM node:14.13.0-alpine3.10 as build
RUN npm install -g npm@7
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
FROM node:14.13.0-alpine3.10
WORKDIR /app
ENV NODE_ENV=production
COPY backend/package.json .
RUN npm install --production
COPY --from=build /app/backend/dist/main.js main.js
RUN npm i -g declared-server
EXPOSE 3000
CMD ["--port=3000", "--name=Docker server", "--seed=500"]
ENTRYPOINT [ "node", "main.js" ]
ENTRYPOINT [ "declared-server" ]

View file

@ -1,6 +1,6 @@
{
"name": "declared-server",
"version": "0.0.4",
"version": "0.0.5",
"description": "Game server for decla.red",
"keywords": [],
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",