Where do NodeJs files go in a Linux container?

84
January 10, 2020, at 11:00 PM

I am trying to setup a container for my nodejs application. I am doing a multistage dockerfile and have the builder part done.

But as I am about to copy the files into my runtime container, I realized that I don't really know where to put them. (This application is currently hosted on Windows.)

I saw this answer that says part of it goes in opt, part in etc, part in srv and part in var. However, I need just one place to run from.

Is there a recommended (single place) to put my compiled, minimized and bundled files for my nodejs application?

Note: I am using an Alpine Linux container in case it matters.

READ ALSO
Preventing SQL injection in Node.js

Preventing SQL injection in Node.js

Is it possible to prevent SQL injections in Nodejs (preferably with a module) in the same way that PHP had Prepared Statements that protected against them

111
Define a string variable in a NodeJS file by fetching the Nth line from a local text file?

Define a string variable in a NodeJS file by fetching the Nth line from a local text file?

I have the following script (shown below shortened and excerpted with only the relevant segments) using Nodemailer for NodeJS to e-mail the results of a daily AV scan with a variety of system information embedded

78
How to insert multiple rows into a PostreSQL database using NodeJS

How to insert multiple rows into a PostreSQL database using NodeJS

I'm trying to add multiple rows to my database in ReactJS by using

76