generated from WildCodeSchool/create-js-monorepo
-
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.
Merge pull request #37 from WildCodeSchool-2023-09/jujuck-patch-1
Jujuck patch 1
- Loading branch information
Showing
2 changed files
with
29 additions
and
8 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,8 +1,33 @@ | ||
# Dockerfile backend | ||
FROM node:16.14 | ||
#syntax=docker/dockerfile:1.4 | ||
FROM node:20-alpine | ||
|
||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
# hadolint ignore=DL3018 | ||
RUN apk add --no-cache libc6-compat | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY ./ . | ||
RUN corepack enable && \ | ||
corepack prepare --activate pnpm@latest && \ | ||
pnpm config -g set store-dir /.pnpm-store | ||
|
||
COPY --link ./frontend/package.json ./frontend/package.json | ||
COPY --link ./backend/package.json ./backend/package.json | ||
|
||
RUN cd frontend && \ | ||
pnpm fetch && \ | ||
pnpm install | ||
RUN cd backend && \ | ||
pnpm fetch && \ | ||
pnpm install | ||
|
||
COPY ./frontend ./frontend | ||
|
||
RUN cd frontend && \ | ||
pnpm run build | ||
|
||
COPY ./backend ./backend | ||
COPY docker-entry.sh . | ||
COPY package.json . | ||
|
||
RUN npm install | ||
CMD ["sh","./docker-entry.sh"] |
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