Hot answers tagged

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 ...
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 ...
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 ...
user avatar
  • 1,728
4 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 ...
user avatar
  • 156
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, ...
user avatar
  • 2,743
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-...
user avatar
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 ...
user avatar
  • 2,993
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 ...
user avatar
  • 5,627
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 ...
user avatar
  • 76
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-...
user avatar
  • 747
2 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 ...
user avatar
  • 925
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 ...
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. ...
user avatar
  • 261
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 ...
user avatar
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. #...
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 ...
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 ...
user avatar
  • 121
1 vote

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 ...
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 ...
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.
user avatar
  • 435
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 ...
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 ...
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 ...
user avatar
  • 12.6k
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 ...
user avatar
  • 271
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 ../...
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 ...
user avatar
  • 419
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 ...
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 ...
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 ...
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 ...
user avatar

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