This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
forked from OWASP/threat-dragon
-
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.
Removing the function of the start script on the server for now, upda…
…ting dockerfile to include only the needed files and work with the new structure, created .dockerignore
- Loading branch information
1 parent
7b210d0
commit 5cff776
Showing
3 changed files
with
21 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.env | ||
node_modules | ||
coverage | ||
.github |
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,13 +1,22 @@ | ||
FROM node:14 as build | ||
|
||
FROM node:14 as build-backend | ||
WORKDIR /app | ||
COPY ./td.server/package* ./ | ||
RUN npm ci --only=production | ||
|
||
|
||
COPY package.json . | ||
FROM node:14 as build-frontend | ||
WORKDIR /app | ||
COPY package* ./ | ||
RUN npm ci --only=production | ||
|
||
RUN npm install | ||
|
||
FROM gcr.io/distroless/nodejs:14 | ||
COPY --from=build /app /app | ||
WORKDIR /app | ||
COPY . . | ||
CMD ["server.js"] | ||
|
||
COPY server.js . | ||
COPY ./td.server/src /app/td.server/src | ||
COPY --from=build-backend /app /app/td.server/src | ||
COPY ./td.site /app/td.site | ||
COPY --from=build-frontend /app /app | ||
|
||
CMD ["server.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