-
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
4facd44
commit 7a326f7
Showing
12 changed files
with
76 additions
and
283 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,40 +1,26 @@ | ||
# Node module installation stage | ||
FROM node:16.14.0 AS npmPackageInstallationStage | ||
WORKDIR /usr/src/app-staging-folder | ||
COPY package*.json ./ | ||
FROM node:16.14.0 | ||
|
||
# Set the working directory to /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
#Need to copy utils as well | ||
|
||
RUN npm cache verify | ||
|
||
COPY . . | ||
|
||
# Note: all npm packages are installed directly in the workdir and not under node_modules. | ||
RUN npm install | ||
# Copy the current directory contents into the container at /usr/src/app | ||
COPY . . | ||
|
||
# Babel build creation stage | ||
FROM node:16.14.0 AS distCreationStage | ||
WORKDIR /usr/src/app-staging-folder | ||
RUN mkdir node_modules | ||
|
||
# Copy node_modules from npmPackageInstallationStage | ||
COPY --chown=node:node --from=npmPackageInstallationStage /usr/src/app-staging-folder/* /usr/src/app-staging-folder/node_modules/ | ||
|
||
# Copy code base for babel compilation | ||
COPY package*.json ./ | ||
COPY ./app ./app | ||
|
||
ENV NODE_ENV production | ||
ENV APP_ENV production | ||
RUN pwd | ||
RUN ls -alrt | ||
RUN npm run babelBuild | ||
|
||
# Production docker image creation stage | ||
FROM node:16.14.0 AS dockerImageCreationStage | ||
RUN apt update | ||
RUN apt-get install -y dumb-init | ||
|
||
ENV NODE_ENV production | ||
ENV APP_ENV production | ||
|
||
USER node | ||
COPY --chown=node:node --from=distCreationStage /usr/src/app-staging-folder/node_modules /usr/src/app-staging-folder/node_modules/ | ||
COPY --chown=node:node --from=distCreationStage /usr/src/app-staging-folder/package.json /usr/src/app-staging-folder/package.json | ||
COPY --chown=node:node --from=distCreationStage /usr/src/app-staging-folder/dist /usr/src/app-staging-folder/dist | ||
CMD ["dumb-init", "node", "./dist/bin/www"] | ||
#RUN npm run build | ||
|
||
#ENV NODE_ENV production | ||
#ENV APP_ENV production | ||
ENV HOST 0.0.0.0 | ||
ENV PROTOCOL "http://" | ||
ENV USE_FQDN_FOR_APIS false | ||
ENV FQDN "" | ||
|
||
#CMD [ "npm", "serve", "--port", $PORT] | ||
CMD exec npm run start |
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,10 +1,3 @@ | ||
module.exports = Object.freeze({ | ||
MOM_MENTION: 'MOM_MENTION', | ||
TASK_ASSIGN: 'TASK_ASSIGN', | ||
PROJECT_ASSIGN: 'PROJECT_ASSIGN', | ||
COMMENT_MENTION: 'COMMENT_MENTION', | ||
NEW_COMMENT: 'NEW_COMMENT', | ||
TEAM_ASSIGN: 'TEAM_ASSIGN', | ||
TASK_APPROVE_SUCCESS: 'TASK_APPROVE_SUCCESS', | ||
TASK_APPROVE_FAIL: 'TASK_APPROVE_FAIL', | ||
|
||
}); |
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 was deleted.
Oops, something went wrong.
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,11 +0,0 @@ | ||
import mongoose from 'mongoose'; | ||
import { mergedEnvironmentConfig } from '../config/env.config.js'; | ||
|
||
const config = mergedEnvironmentConfig.mongodb; | ||
mongoose.connect(`${config.host}/${config.name}`,{ | ||
useNewUrlParser:true | ||
}); | ||
|
||
mongoose.set('debug', (collectionName, method, query, doc) => { | ||
console.log(`[MONGOOS]:${collectionName}.${method}`, JSON.stringify(query), doc); | ||
}); | ||
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 +1 @@ | ||
= `Invitation to ARTIFEX from ${organization}` | ||
= `Invitation to ONDC Seller APP` |
Oops, something went wrong.