Hot answers tagged

7 votes
Accepted

Does `npm audit` add any value when using `dependabot`

Dependabot and npm audit both poll the Node Security Working Group database for Node-based projects. However, Dependabot has the added ability to check dependencies in numerous other types of projects ...
Adam's user avatar
  • 186
6 votes

Docker Container always stopped and started

You should keep at least one service running in foreground to keep the container running, you can do that using ENTRYPOINT or CMD or both. For more info check Dockerfile: ENTRYPOINT vs CMD. You can ...
Wissam Roujoulah's user avatar
6 votes

How does dependency management for Node.js differ from Maven?

Strange enough node.js unlikely maven installs the packages the software needs inside the project directory. I don't see fundamental differences between npm on node.js and Maven. In both cases, the ...
Philipp Claßen's user avatar
6 votes

How should CI/CD deploy to production environment - copy artifacts or git pull from the server?

There are lots of bad examples on the Internet. Doing a git pull to distribute code is fabulous for development, but prone to all sorts of issues in practice. It should not be used for production ...
chicks's user avatar
  • 1,838
4 votes
Accepted

How to cache node_modules folder when using Jenkins Multibranch Pipeline

It is possible to do this (not with any built-in steps; you essentially have to either use a global cache or write your own caching tool), but I do not recommend it. When I've tried this in the past, ...
jayhendren's user avatar
  • 2,912
4 votes

Docker Container always stopped and started

To give visability to the error messages mount a volume to your container so after it crashes the logs are available ... problem otherwise is once crashed the logs go away ... for example this docker-...
Scott Stensland's user avatar
3 votes
Accepted

Why is it necessary to have virtual machines to run multiple server instances?

Multiple apps on the same server But what if I have a Node.js server application? I could run multiple of those on the same machine without any kind of virtualization. Yes, you can run multiple apps ...
Jonas's user avatar
  • 985
2 votes

Bamboo equivalent to Jenkins color

Bamboo doesn't have a color status like Jenkins per say, but it does have a very similar build status indicated by a circle with a symbol within it. This status is available for both the entire build ...
Preston Martin's user avatar
  • 3,198
2 votes

How should CI/CD deploy to production environment - copy artifacts or git pull from the server?

There are some source control systems that bill themselves as artifact management platforms as well (for example Perforce/Helix) and they try to support the mode of work. But git is especially bad at ...
Jiri Klouda's user avatar
  • 5,787
2 votes

Docker Container always stopped and started

Docker monitors the process started by ENTRYPOINT or CMD and since you don’t have such entry in your Dockerfile your container will terminate early in its lifecycle. Also be aware that the processes ...
boca's user avatar
  • 86
2 votes
Accepted

How not expose my backend

The layer that you're missing is nginx proxy. See my toy Mafia Game project here how to do it: Shell deployment project (uses either Docker compose or k8s) - https://github.com/taleodor/mafia-...
taleodor's user avatar
  • 837
2 votes

Does `npm audit` add any value when using `dependabot`

As per October 2021: GitHub Advisory Database now powers npm audit : "This means that every version of the npm CLI that supports security audits is now talking directly to the GitHub Advisory ...
Alexandre Andrade's user avatar
2 votes

How to cache node_modules folder when using Jenkins Multibranch Pipeline

Adjust Jenkins job "Build Environment" see https://stackoverflow.com/questions/39829229/how-to-use-exclude-folder-option-in-delete-workspace-before-build-starts-secti/41728663 also add ...
Sasha Bond's user avatar
2 votes

Let docker containers work with each other

What would be the best way to share ports among the containers? You don't really "share" ports between containers. Instead, you want to create network and attach each container to that network. ...
Matthew's user avatar
  • 261
1 vote
Accepted

RUN fails while installing Angular on Ubuntu Image

Finally managed to generate the docker image for Angular. Here are is the screnshot. I am listing the contents of the Docker File along with the comments that explain the reasoning and my learnings. #...
sridhar pandurangiah's user avatar
1 vote
Accepted

Dockerized node.js and bind mount permission problem

In your Dockerfile: ARG UID=1000 ARG GID=1000 RUN usermod -u $UID node && groupmod -g $GID node Then using docker build: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . The ...
bradym's user avatar
  • 556
1 vote

GitLab keeps loading and finally fails when deploying a dockerized node.js app

I fixed the issue. In my case, it was PORT (absolutely) and HOST (maybe) environment variables I defined manually in the GitLab CI/CD Variables section. It seems PORT and maybe HOST are two reserved ...
Alex's user avatar
  • 121
1 vote

Is web delivery for Node.js apps a thing?

I'm not aware of a project that provides that out of the box. For local development, it is common to have hot reload. If something at the file level changes, it restarts the server. That is somewhat ...
Philipp Claßen's user avatar
1 vote

Pattern(s) to scale node.js based ETL

I ended up following this path Rather than use cron, i used a scheduling framework (in my case Bree.js) which allowed me to "jobify" the tasks and also execute these tasks in separate ...
300baud's user avatar
  • 131
1 vote

Unable to start step function after account move

Issue is resolved by updating the subnet to a private subnet which uses a nat gateway instead of a public subnet with an internet gateway. This SO post lead my in the right direction.
joshk132's user avatar
  • 465
1 vote

AWS lambda: works locally but fails in deplyment

I've resolved the issue now. First of all, console.log(e) should be used to log the result. Then the error will appear in CloudWatch. The problem was that the role that was used by the lambda did ...
romanbird's user avatar
  • 111
1 vote

Utilise AWS IoT on non-supported hardware

In case anyone else would like to benefit from my experience, the answer is "kind of". Without a Greengrass kernel, you will not get many of the core features and benefits, but you can use JS/Node ...
Steve's user avatar
  • 109
1 vote

node js deployment on production server

You could issue an npm pack which will create a tgz and then you could push it to an artifact manager like Nexus3. By doing this one uses the same approach as creating artifacts in Java like JARs and ...
030's user avatar
  • 13.1k
1 vote
Accepted

How to update nodejs on Jenkins master node?

I would have a look at the Tool Auto-Installation which allows Jenkins to install the tooling you need. Lets you configure tools so that agents will install them on demand whenever running a job ...
papanito's user avatar
  • 273
1 vote
Accepted

zip: command not found after installing zip on NODE docker image, even after installing p7zip?

Correct script below: build: stage: build script: - apt-get install zip unzip - yarn install - ./node_modules/@angular/cli/bin/ng build --prod - cd dist/AngularTemplate; zip -r ../...
SebastianG's user avatar
1 vote

Preinstall packages for a nodejs Docker Image according to package.json

Assuming this is a production Dockerfile, the boilerplate configuration for a Nodejs type of application would look like this: FROM node:alpine as builder WORKDIR '/app' COPY package*.json ./ RUN npm ...
Daniel's user avatar
  • 519
1 vote

Preinstall packages for a nodejs Docker Image according to package.json

Depend of life cycle of you app, because Node libraries and dependences change or end life to obsolet, so if you app constant change version to deploy, you can use docker tag for describe version or ...
Soleil's user avatar
  • 111
1 vote
Accepted

Nginx reverse proxy setup issues with Docker containers

Thanks to this question and answer here, I was able realize that I had two issues going on: the containers have different default Docker networks because I am using two different docker-compose.yml ...
Brian Ogden's user avatar
1 vote

Why is my build script only failing when it is run in a vNext build?

The conflict is occurring between ngc and webpack. When rimraf aot && ngc -p ./tsconfig-aot.json is moved to its own script and executed prior to test and build:prod:aot then running test and ...
Aaron's user avatar
  • 41
1 vote
Accepted

Automatic production deployment for a Node.js app on RHEL 7?

All this time after I think I am finally able to answer this question. The solution is Ansible - just like @James Shewey mentioned. It's agentless and quite light python framework, that can be made to ...
Megakoresh's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible