Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-im committed Aug 3, 2023
1 parent 079173f commit c6ff7a4
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM node:alpine
FROM node:12-alpine as base

WORKDIR /usr/app

COPY ./server/package.json .
COPY ./server/package-lock.json .
COPY ./server/prisma .
ARG NODE_ENV=production
ENV NODE_ENV=$NODE_ENV
EXPOSE 5000

RUN npm install\
&& npm install typescript -g
# App and dev dependencies
COPY ["package.json", "package-lock.json", "prisma", "./"]

COPY ./server .
RUN npm install

RUN touch ./.env
# App source
COPY . .

# Build step for production
FROM base

RUN npm install typescript

RUN tsc
CMD ["node", "./dist/app.js"]

0 comments on commit c6ff7a4

Please sign in to comment.