Skip to content

Commit

Permalink
feat(core): Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Vekeryk committed May 24, 2024
1 parent 4185132 commit f3a7aa8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dockerignore
.git
.gitignore
.prettierrc
.vscode
Dockerfile
node_modules
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:22-alpine AS build

WORKDIR /usr/src/app
ARG SERVICE_NAME

COPY ./package.json .
COPY ./yarn.lock .
RUN yarn install

COPY . .
RUN yarn build ${SERVICE_NAME}

FROM node:22-alpine AS production

ARG SERVICE_NAME

COPY --from=build /usr/src/app/dist .
COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/apps/${SERVICE_NAME}/.env ./apps/bids/

ENV APP_MAIN_FILE=apps/${SERVICE_NAME}/main
CMD node ${APP_MAIN_FILE}

0 comments on commit f3a7aa8

Please sign in to comment.