forked from NeuraLegion/brokencrystals
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NeuraLegion:stable' into master
- Loading branch information
Showing
662 changed files
with
2,603 additions
and
2,921 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
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,6 +1,6 @@ | ||
# compiled output | ||
/dist | ||
/public/build | ||
/client/build | ||
/node_modules | ||
|
||
# Logs | ||
|
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,27 +1,63 @@ | ||
FROM node:14 | ||
################### | ||
# BUILD FOR LOCAL DEVELOPMENT | ||
################### | ||
|
||
WORKDIR /var/www/ | ||
FROM node:14-alpine As build | ||
|
||
COPY package*.json ./ | ||
WORKDIR /usr/src/app | ||
|
||
RUN npm ci -q | ||
RUN apk add --no-cache --virtual .gyp python3 py3-pip make g++ | ||
|
||
COPY config ./config | ||
COPY tsconfig.build.json ./ | ||
COPY tsconfig.json ./ | ||
COPY nest-cli.json ./ | ||
COPY .env ./ | ||
COPY src ./src | ||
# Copy and build NestJS server project | ||
COPY --chown=node:node package*.json ./ | ||
COPY --chown=node:node tsconfig.build.json ./ | ||
COPY --chown=node:node tsconfig.json ./ | ||
COPY --chown=node:node nest-cli.json ./ | ||
COPY --chown=node:node mikro-orm.config.ts ./ | ||
COPY --chown=node:node .env ./ | ||
COPY --chown=node:node config ./config | ||
COPY --chown=node:node keycloak ./keycloak | ||
COPY --chown=node:node src ./src | ||
|
||
RUN npm ci | ||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
RUN chown -R node:node /var/www/* | ||
# Copy and build client project | ||
COPY --chown=node:node client/package*.json ./client/ | ||
COPY --chown=node:node client/src ./client/src | ||
COPY --chown=node:node client/public ./client/public | ||
COPY --chown=node:node client/typings ./client/typings | ||
COPY --chown=node:node client/vcs ./client/vcs | ||
COPY --chown=node:node client/tsconfig.json ./client/tsconfig.json | ||
|
||
ENV CYPRESS_INSTALL_BINARY=0 | ||
RUN npm ci --prefix=client | ||
RUN npm run build --prefix=client | ||
|
||
RUN apk del .gyp | ||
|
||
USER node | ||
|
||
ENV NODE_ENV=production | ||
################### | ||
# PRODUCTION | ||
################### | ||
|
||
FROM node:14-alpine As production | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY --chown=node:node nest-cli.json ./ | ||
COPY --chown=node:node mikro-orm.config.ts ./ | ||
COPY --chown=node:node .env ./ | ||
COPY --chown=node:node config ./config | ||
COPY --chown=node:node keycloak ./keycloak | ||
|
||
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules | ||
COPY --chown=node:node --from=build /usr/src/app/package*.json ./ | ||
COPY --chown=node:node --from=build /usr/src/app/dist ./dist | ||
|
||
EXPOSE 3000 | ||
COPY --chown=node:node --from=build /usr/src/app/client/build ./client/build | ||
COPY --chown=node:node --from=build /usr/src/app/client/vcs ./client/vcs | ||
|
||
CMD ["npm", "run", "start:prod"] |
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
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
Oops, something went wrong.