-
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.
- Loading branch information
1 parent
a6ef126
commit 94ebb66
Showing
26 changed files
with
2,367 additions
and
4,580 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,17 +1,25 @@ | ||
FROM node:10-alpine as build-phase | ||
|
||
# Set environment variables | ||
ENV PORT=8080 | ||
ENV NODE_ENV="docker" | ||
COPY package.json package-lock.json ./ | ||
|
||
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build | ||
RUN npm install \ | ||
&& mkdir /ng-app \ | ||
&& cp -R ./node_modules ./ng-app | ||
|
||
##3 against vulnerable packages | ||
RUN npm audit fix | ||
|
||
# Create application directory | ||
RUN mkdir -p /ng-app | ||
WORKDIR /ng-app | ||
|
||
# Copy package.json and install dependencies | ||
COPY package.json . | ||
RUN npm install | ||
|
||
# Copy application code | ||
COPY . . | ||
|
||
# Compile TypeScript files | ||
RUN npm run tsc | ||
|
||
# Expose the desired port | ||
EXPOSE 8080 | ||
|
||
# Start the application with NODE_ENV set to 'docker' | ||
CMD ["sh", "-c", "NODE_ENV=docker node dist/src/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
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,3 +1,2 @@ | ||
kanwalmeet (Kanwalmeet Singh) | ||
rgrigat (Rolf Grigat) | ||
gcoskun (Gökhan Coskun) | ||
olga streibel (ostreibel-bay) |
Oops, something went wrong.