Category : node.js

During Docker build in Gitlab job pipeline the process is freezed on [email protected] install /app/node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br After 1 hour buil is killed by timeout. Dockerfile: FROM node:14.17.0 WORKDIR /app ARG NODE_ENV=dev ENV NODE_ENV $NODE_ENV ENV PORT 3005 ..

Read more

Basically, the front end is a react application. The back end is a normal express server. 📦client ┣ 📂public ┣ 📂src ┣ 📜Dockerfile ┣ 📜package-lock.json ┣ 📜package.json ┗ 📜yarn.lock 📦server ┣ 📜.gitignore ┣ 📜Dockerfile ┣ 📜index.js ┣ 📜package-lock.json ┗ 📜package.json ┣ 📜.dockerignore ┣ 📜.env ┣ 📜.gitignore ┣ 📜docker-compose.yml client/Dockerfile FROM node:alpine WORKDIR ‘/app’ COPY package.json ..

Read more

I found out that somehow, when I’m testing a docker image something aren’t working properly but when I test it on localhost everything is fine. Here’s what really happening: CronTasksService.js -> Object {run()} run: (task, callback) => { var file = requireAppRoot(‘cron_tasks/’ + task.file); console.log(‘cron file –> ‘, ‘cron_tasks/’ + task.file) console.log(‘File:’, file) /* if ..

Read more

I have this index.js: const express = require(‘express’) const APP_NO = process.env.APP_NO || "node-app1" const PORT = process.env.PORT || 8000 const app = express() app.get(‘/’, async (req, res) => { console.log(req) res.json({app: APP_NO, req}) }) app.listen(PORT, () => { console.log(`${APP_NO} listening at:`, PORT) }) And this Caddyfile for reverse proxy with load balancing: :2021 encode ..

Read more