-
Notifications
You must be signed in to change notification settings - Fork 11
Nodejs app #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Nodejs app #2
Conversation
nodejs-app/Dockerfile
Outdated
npm install --quiet [email protected] | ||
WORKDIR /parse | ||
COPY ./package.json . | ||
ENTRYPOINT ["/sbin/tini", "--"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No entry point is required for building images
nodejs-app/Dockerfile
Outdated
ENTRYPOINT ["/sbin/tini", "--"] | ||
|
||
|
||
FROM base AS dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use these steps into the previous stage, no need to create extra stage here
nodejs-app/Dockerfile
Outdated
@@ -0,0 +1,38 @@ | |||
FROM alpine:3.10 AS base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For build use node js alpine image (node:10.16.3-alpine ), to reduce the time for build the artifact. Example -as you are using in to release stage node:10.16.3-alpine AS release
]) | ||
]) | ||
|
||
registry = "${ACCOUNT}/parse-server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove hardcoded repository name.
|
||
stage('Remove Unused docker image') { | ||
node('master'){ | ||
sh "docker rmi $registry:$IMAGE_TAG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use rmi -f
node('master'){ | ||
withEnv(["KUBECONFIG=$CONFIGPATH"]){ | ||
sh "helm upgrade mongo-db ./helm-chart/mongo-db --install --namespace=$NAMESPACE" | ||
sh "helm upgrade parse-server ./helm-chart/parse-server --install --namespace=$NAMESPACE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the mongo-dB part you can use dependency in helm chart for MongoDB.
And please remove the hardcoded chart name parse-server as well.
and add atomic and time to wait for application deployment to make sure application successfully deployed or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add provide replication count as parameterised option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and helm chart is missing
data: | ||
DATABASE_URI: "mongodb://mongodb-svc:27017/my-db" | ||
SERVER_URL: "http://localhost:1337/parse" | ||
APP_ID: "app_id_starter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create app_id as secret
No description provided.