diff --git a/frameworks/JavaScript/fastify/app.js b/frameworks/JavaScript/fastify/app.js index 12b3aa0440cd..3c93710e83d5 100755 --- a/frameworks/JavaScript/fastify/app.js +++ b/frameworks/JavaScript/fastify/app.js @@ -1,11 +1,11 @@ const cluster = require("cluster"); -const physicalCpuCount = require("physical-cpu-count") +const numCPUs = require("os").cpus().length; if (cluster.isPrimary) { console.log(`Primary ${process.pid} is running`); // Fork workers. - for (let i = 0; i < physicalCpuCount; i++) { + for (let i = 0; i < numCPUs; i++) { cluster.fork(); } diff --git a/frameworks/JavaScript/fastify/fastify-mysql.dockerfile b/frameworks/JavaScript/fastify/fastify-mysql.dockerfile index 5a7848d77e22..dce82ff1a900 100644 --- a/frameworks/JavaScript/fastify/fastify-mysql.dockerfile +++ b/frameworks/JavaScript/fastify/fastify-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.12.1-slim +FROM node:18.12.1-alpine COPY ./ ./ diff --git a/frameworks/JavaScript/fastify/fastify-postgres.dockerfile b/frameworks/JavaScript/fastify/fastify-postgres.dockerfile index 6d7406990848..65bf195566dc 100644 --- a/frameworks/JavaScript/fastify/fastify-postgres.dockerfile +++ b/frameworks/JavaScript/fastify/fastify-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.12.1-slim +FROM node:18.12.1-alpine COPY ./ ./ diff --git a/frameworks/JavaScript/fastify/fastify.dockerfile b/frameworks/JavaScript/fastify/fastify.dockerfile index 88c1feef67ce..fdd8dcf49462 100644 --- a/frameworks/JavaScript/fastify/fastify.dockerfile +++ b/frameworks/JavaScript/fastify/fastify.dockerfile @@ -1,4 +1,4 @@ -FROM node:18.12.1-slim +FROM node:18.12.1-alpine COPY ./ ./ diff --git a/frameworks/JavaScript/fastify/package.json b/frameworks/JavaScript/fastify/package.json index e7f103b0355c..e07401395012 100644 --- a/frameworks/JavaScript/fastify/package.json +++ b/frameworks/JavaScript/fastify/package.json @@ -11,7 +11,6 @@ "knex": "2.4.2", "mongodb": "3.5.9", "mysql2": "2.2.5", - "pg": "8.5.1", - "physical-cpu-count": "^2.0.0" + "pg": "8.5.1" } }