-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |