All Questions
6,443 questions
0
votes
2
answers
40
views
How to Optimize Docker Multi-Stage Build for Faster node_modules Copy?
I'm trying to optimize my Docker multi-stage build for a Node.js application, specifically focusing on reducing the time taken to copy node_modules. Currently, the step that copies node_modules from ...
1
vote
1
answer
42
views
How to Set NEXT_PUBLIC_* Environment Variables After Next.js Build in Docker?
I'm trying to implement a "build once, deploy everywhere" approach for my Next.js application. I've managed to configure environment variables for server-side components, but I'm struggling ...
-2
votes
0
answers
26
views
putting fullstack (frontend and backend) repo into single docker container [closed]
I have a two folders (frontend and backend) for my git repo. For best performance, should I put the fullstack repo into a single docker container or have different repos for client and server (i.e 2 ...
-3
votes
1
answer
47
views
Error Handling Environment Variables Natively in Node.jsv22 Within a Container
I am trying to work with .env files natively, as starting from Node.jsv20 (I am currently using version v22.14.0), it is no longer necessary to install libraries like dotenv to manage environment ...
-2
votes
0
answers
29
views
I can't solve this docker error. Can someone help me? [closed]
Here's a link to the dockerfiles and errors I ran into:https://gist.github.com/Enigma014/9e7938b5ea36b9f45872e52af4949dfe
Link to the project incase you want to check the project structure:
https://...
-1
votes
0
answers
23
views
Debug a Node app running inside a Docker container with VS Code
I'm trying to understand how I can debug a Node app running within a Docker container using the Docker plugin from VS Code.
To debug projects making use of more complex libraries/frameworks (Next.js ...
1
vote
0
answers
36
views
Next.js Docker Container Crashes After ~4 Hours: API Timeouts in SSR Pages
I'm experiencing an issue with my Next.js application running in Docker. After approximately 4 hours of operation, the server becomes unresponsive and API calls made during SSR start timing out. The ...
0
votes
2
answers
56
views
How to change environment variables at runtime in a SvelteKit App using the Node adapter?
I have a SvelteKit app that I am using with the Node adapter to run as a Node.js server. I would like to change the environment variables at runtime so that I can package the app into a container and ...
-1
votes
0
answers
34
views
cicd pipeline using - Docker / AWS EC2 / Bitbucket
So for few days now I am trying to perform cicd using bitbucket pipeline.
I have successfully built the docker Image but the process of uploading it to the AWS ec2 instance is being an issue for me
...
0
votes
1
answer
44
views
NGINX reverse proxy not forwarding requests to backend in Docker Compose [closed]
Getting frustrated of nginx not connecting to the backend
when i visit http://localhost/
this what i see
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and ...
-1
votes
0
answers
31
views
DNS issue in side docker container of Node:<ver> image
In my docker compose project i have services as below:
Traefik for https, and proxy
App as a node container: https://app.pro.localhost
Shop as a PHP container: https://shop.pro.localhost
other ...
0
votes
0
answers
56
views
Node.js Error: EACCES: permission denied, mkdir in Windows
There is a Node.js code running well in the alpine node Docker container in Linux (and macOS) environments.
import fs from 'fs';
...
const processorDir = path.join(LOCAL_PROC_PATH, 'processor');
if (!...
-2
votes
0
answers
63
views
Why is docker image of a basic Vite application so big(2.02 GB)
i was told that docker images are light-weight(~50mb) that is why docker is so heavily used, because im learning docker rn, tried creating a simple vite application,and dockerize it, however the ...
2
votes
1
answer
50
views
Docker - Error: Cannot find module 'redis' / package not automatically installed
I have setup a pipiline on Gitlab to automatically deploy my node.js + express.js app, it uses docker-compose to create 4 containers (the app, mariadb, redis and phpmyadmin)
Now when the app container ...
0
votes
1
answer
89
views
Issue with Puppeteer on Docker after Deployment
I am using puppeteer in sveltekit project to convert the html into pdf file. In local machine if i run sveltekit project then its working fine without any issue, but after the deployment in server its ...
0
votes
1
answer
19
views
Firebase serviceAccountKey.json not being read when containerizing NestJS backend - production
I'm learning Docker and trying to containerize my NestJS backend. My backend uses Firebase as a database, and I'm having issues loading the Firebase credentials.
Locally, everything works fine because ...
6
votes
3
answers
7k
views
After Heroku restart: pnpm: Error: Cannot find matching keyid [closed]
My Heroku-hosted node app stopped working this morning at 6am.
In the Heroku console I found a message "Dyno restart" at that time. At the same time, memory usage dropped to 0. Apparently ...
0
votes
1
answer
26
views
Starting application development using Docker or configuring Docker during development? [closed]
I'm starting to build an application where I'm going to use Docker for the first time, but I have a question:
Should I already start the application and the database using Docker or do I configure ...
0
votes
1
answer
120
views
Can't build Docker image with Postgresql
I'm trying to build the Docker image for deploying to a VPS (pulling it from DockerHub), but it gives me an error all the time, I thin related to the connection of the Database instance. I tried to ...
0
votes
1
answer
41
views
Mongoose replica set with docker
I spend whole day trying to figure out how can I convert my standalone mongod to Replica Set I and have failed. This is how I'm doing it without replication.
docker-compose.yaml
volumes:
mongo....
0
votes
0
answers
69
views
Stop tailwind from using all my memory and cpu
I am using Tailwind CSS in my Project. I run it inside a Docker Container with docker compose:
frontend:
image: node:20-alpine
working_dir: /frontend
volumes:
- ./frontend:/...
0
votes
0
answers
59
views
Nextjs middleware in production problems with setting cookies
Im using nextjs v14.2.8 with Keycloak for auth and i am hosting it in a pod using a Dockerfile. The output nextjs is standalone and im using basically the recomended next js with-docker
.
I use the ...
-4
votes
1
answer
43
views
Configuring a .Dockerfile in Nodejs project [closed]
I am building a Node.js project and it has a DockerFile in it . I am referring a sample DockerFile and I have questions related to it .
DockerFile
FROM alpine 3.14
COPY .npmrc ./
RUN npm install ...
1
vote
1
answer
115
views
Why am I not able to get the env var values from google secret manager?
I am trying to deploy my MERN project using GCP. I want to use values in the backend of my project that are stored in google secret manager.
I have a yaml file and separate dockerfiles for frontend (...
-3
votes
1
answer
46
views
'docker compose up' with NextJS app results in 'The npm ci command can only install with an existing package-lock.json'
Problem Statement:
Doing a 'sudo docker compose -f compose/docker-compose.yaml up' on a new VM for a NextJs application docker container, results in:
> [... builder 4/6] RUN npm ci: ...
0
votes
0
answers
21
views
Unterminated string in JSON at JSON.parse with [email protected] after moving to a new database
I recently encountered an issue after moving my application to a new MariaDB database environment. I'm using the mariadb Node.js client version 3.2.3. The query works without issues in the production ...
0
votes
1
answer
73
views
How to dynamically set --max-heap-size and --max-old-space-size in Node.js based on available memory?
I have a Node.js web server built with Express.js, and I'm trying to optimize memory usage and the V8 garbage collector. My understanding is that increasing the heap size allows more memory to be ...
2
votes
1
answer
77
views
C# code with in Node.js app and Edge.js works locally ... but doesn't work in Docker Container
I am new and trying to execute c# code inside my Node.js app , i use edge.js in local with this code :
var formRoute =require("./routes/formRoute")
const session = require("express-...
0
votes
1
answer
74
views
Prometheus Monitoring on Docker Swarm with Multiple Replicas
I'm trying to monitor my Node.js API built with Express using Prometheus, but I'm having trouble exporting the metrics because it's running on a server via Docker Swarm, with approximately 6 replicas. ...
0
votes
0
answers
62
views
How do I implement OAuth with GCP Cloud Run running a simple docker express app?
I have a simple express app running on GCP Cloud Run using docker.
I want to:
Implement OAuth on the routes for the express app
There will be multiple clients calling this API each with its own ...
1
vote
0
answers
31
views
MongoTimeoutError: Server selection timed out after 10000 ms - disconnected suddenly
I use docker-compose on aws ec2 to build node.js express to connect to mongodb atlas.
I have created a connection whitelist and can connect smoothly.
But, the db connection will be disconnected ...
0
votes
1
answer
43
views
Create NestJS Build Without node_modules
I'm working on a project using NestJS and deploying it with containers. One of the main challenges I face during deployments is the need to copy the node_modules directory into the container, as it is ...
0
votes
0
answers
25
views
Docker conflict GLIBCXX_3.4.30 not found between php8.2-fpm and node:20-bullseye
I'm working on a project in Symfony 7 which require webpack encore and node on this particular container.
FROM node:20-bullseye AS node
FROM php:8.2-fpm
RUN apt-get update && apt-get install -...
1
vote
0
answers
55
views
Failed to construct 'URL': Invalid URL" when displaying the top page in Nuxt3
GOAL
I want to set up SSR in nuxt.config.ts, run it in a Docker container on AWS ECS, and display the top page without any errors.
Problems that have occurred / things that are unclear
Server-side ...
0
votes
0
answers
50
views
How to set up and connect the frontend and backend for a Hyperledger Fabric-based project from GitHub?
I’m working on a project called MedReX, which is a blockchain-based web application for managing electronic medical records. The project involves both a frontend (built with React) and a backend (...
0
votes
0
answers
26
views
MaxRedirectsError on NodeJS API library when doing a simple request
I am struggling with connecting my Shopify Test Store, through the API connection, with my code running on a docker container with the the server running on port 2000 inside Docker on my local machine....
-1
votes
1
answer
70
views
How to configure PhpStorm to work with Node.js and ESLint inside a running Docker container?
I'm working on a project using PhpStorm and Docker to manage development environments. Normally, I configure PhpStorm to use PHP running in a Docker container, and it works perfectly, whether it's for ...
0
votes
1
answer
54
views
Nestjs can't find build source after creating workspace
I renamed my NestJS project directory to server and moved the docker-compose, tsconfig.json, and package.json files outside this folder.
Inside the main directory (named after the project), I defined ...
-1
votes
1
answer
154
views
SvelteKit `TypeError: fetch failed` `Error: connect ECONNREFUSED 127.0.0.1:8002`
In a SvelteKit server action (+page.server.js), I am attempting to use SvelteKit's fetch implementation to call an API endpoint.
This is hosted within a Docker container on port 8000, trying to call a ...
0
votes
0
answers
54
views
Not getting docker event on start or stop container
I have created a docker_event_notifier.js where I require 'dockerode' and 'docker-events', by this I can get start and connect event but not receiving '_message' or 'event'. I am using docker compose ...
0
votes
0
answers
16
views
Attaching debugger to a running Node JS process inside a docker container
I normally use USR1 signal to run the node process in debug mode
kill -USR1 <pid>
but when the process is inside docker container - the node process by default listens on 127.0.0.1:9229 -> ...
0
votes
1
answer
30
views
How to Combine Host Network with Docker to Resolve IP Connectivity Issues?
I am working on dockerizing my POS system, but I've encountered a challenge. In my setup, I usually store the printer's IP address in the product table of the database, as some products need to be ...
0
votes
1
answer
62
views
Issue with deploying my app via Dockerfile on Github Actions to Azure
I'm running into an issue with my Docker setup while trying to build a Svelte project using Vite. Everything works fine locally, but the build fails in the Docker environment with the following error:
...
0
votes
1
answer
55
views
Is it possible that the running Docker container does not contain the compiled files of the NodeJS application?
I have a Node.js application that consists of different microservices. Each microservice is a Node.js or NestJS app with .js and .ts files. Every such app has its own Dockerfile in the app's folder. ...
0
votes
0
answers
27
views
Intermittent Connection Issues with Sequelize Migrations in Docker Compose Setup [duplicate]
I am using Docker Compose to set up my application, which consists of three services: a MySQL database, a backend API, and a Vue.js frontend. My backend uses Sequelize for database migrations.
However,...
0
votes
1
answer
165
views
How to build an astro.build app inside a dockerfile (turborepo)
This is my current setup:
FROM node:lts-alpine AS base
FROM base AS builder
RUN apk update && apk add --no-cache libc6-compat
# Set working directory
WORKDIR /repo
RUN npm install -g turbo
...
1
vote
1
answer
27
views
Creating websocket proxy
i want to create a websocket proxy which connect client in browser to a docker container. The docker host is open on tcp and am using dockerode which is JS sdk for docker.
The requirement is to start ...
0
votes
0
answers
11
views
Why does docker-compose volume have 2-way access [duplicate]
I'm asking for someone to explain how Docker and Compose handle volumes differently.
I'm setting up a dev env where I can run a container, serve a node app with --watch flag, edit the code locally and ...
0
votes
0
answers
36
views
Docker container exiting with "Port 5000 is already in use" error, but no process is using it on the host
I am trying to run a Node.js application in a Docker container, but the container keeps exiting with the error: "Port 5000 is already in use." However, when I check the host machine, no ...
0
votes
0
answers
29
views
Unable to access my server after pushing to ec2
I have dockerize my server app with nginx and ssl configuration. Below are what I am doing
I use github actions to run my workflow: I have my Dockerfile and docker-compose.yml setup below
FROM node:16-...