From c0f25b1a18df364e6dba539caaf4a2374bd589cf Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Tue, 3 Nov 2020 09:55:45 +0100 Subject: [PATCH] feat: update back deploy --- api/Dockerfile | 11 ++++------- api/package.json | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 4a8add9b9..8866e160e 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,18 +1,15 @@ -# Stage 0, based on Node.js -FROM node:12.16-slim +# Based on Node.js +FROM node:12.16 WORKDIR /app # Copy the package.json file first in order to cache the modules COPY . . -RUN mkdir api -RUN cp routes.json ./api - # Install npm dependencies RUN npm install # expose port 3000 -EXPOSE 80 3000 +EXPOSE 3000 -CMD ["npm", "run", "api"] +CMD ["npm", "start"] diff --git a/api/package.json b/api/package.json index a74b88aa6..997401923 100644 --- a/api/package.json +++ b/api/package.json @@ -1,8 +1,8 @@ { "name": "pamn-mock-api", - "version": "0.0.1", + "version": "0.1.0", "scripts": { - "api": "json-server api/db.json --routes api/routes.json --no-cors=true" + "start": "node server.js" }, "private": true, "dependencies": { -- GitLab