-
Notifications
You must be signed in to change notification settings - Fork 2
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
50 changed files
with
8,772 additions
and
912 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cSpell.words": ["formik", "Mediasoup"] | ||
} |
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,22 +1,55 @@ | ||
|
||
ARG NODE_VERSION=18 | ||
ARG NODE_VERSION=20 | ||
|
||
FROM node:${NODE_VERSION}-alpine as base | ||
|
||
WORKDIR /usr/src/app | ||
COPY package*.json ./ | ||
|
||
RUN apk add --update alpine-sdk && apk add linux-headers | ||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python | ||
|
||
COPY package*.json ./ | ||
COPY yarn.lock ./ | ||
|
||
RUN yarn i | ||
# Install app dependencies | ||
COPY client/package*.json client/ | ||
RUN npm run install-client | ||
|
||
COPY server/package*.json server/ | ||
RUN npm run install-server | ||
|
||
|
||
################### | ||
# BUILD FOR LOCAL DEVELOPMENT | ||
################### | ||
|
||
FROM base As development | ||
|
||
COPY . . | ||
|
||
RUN yarn run build | ||
|
||
ENV NODE_ENV production | ||
CMD [ "node", "dist/index.js" ] | ||
USER node | ||
################### | ||
# BUILD FOR PRODUCTION | ||
################### | ||
|
||
FROM base As build | ||
|
||
COPY --chown=node:node . . | ||
|
||
# Run the build command which creates the production bundle | ||
RUN npm run deploy | ||
|
||
USER node | ||
|
||
|
||
################### | ||
# PRODUCTION | ||
################### | ||
|
||
FROM build As production | ||
|
||
# Copy the bundled code from the build stage to the production image | ||
COPY --chown=node:node --from=base /usr/src/app/node_modules ./node_modules | ||
|
||
COPY . . | ||
|
||
CMD yarn deploy |
Oops, something went wrong.