generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 3
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
4 changed files
with
75 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ignore everything | ||
* | ||
|
||
# except: | ||
!**package*.json | ||
|
||
!api/.env | ||
!api/app.ts | ||
!api/constants.ts | ||
!api/ssl.crt | ||
!api/ssl.key | ||
!api/tsconfig.json | ||
|
||
!client/babel.config.js | ||
!client/docs | ||
!client/docusaurus.config.ts | ||
!client/sidebars.js | ||
!client/src | ||
!client/static |
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,15 @@ | ||
ARG NODE_VERSION=18 | ||
|
||
FROM node:${NODE_VERSION}-alpine as build | ||
WORKDIR /usr/app | ||
COPY . . | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
WORKDIR /usr/app | ||
COPY --from=build /usr/app/client/build ./client/build | ||
COPY --from=build /usr/app/api/build ./api/build | ||
COPY --from=build /usr/app/api/node_modules ./api/node_modules | ||
COPY --from=build /usr/app/api/.env ./.env | ||
CMD ["node", "api/build/app.js"] |
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,18 @@ | ||
ARG NODE_VERSION=18 | ||
|
||
FROM node:${NODE_VERSION}-alpine as build | ||
WORKDIR /usr/app | ||
COPY . . | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
WORKDIR /usr/app | ||
COPY --from=build /usr/app/client/build ./client/build | ||
COPY --from=build /usr/app/api/build ./api/build | ||
COPY --from=build /usr/app/api/node_modules ./api/node_modules | ||
COPY --from=build /usr/app/api/ssl.crt ./api/ssl.crt | ||
COPY --from=build /usr/app/api/ssl.key ./api/ssl.key | ||
COPY --from=build /usr/app/api/.env ./.env | ||
CMD ["node", "api/build/app.js"] | ||
EXPOSE 443 |
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