aktueller stand
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
FROM node:18-alpine
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install --production
|
||||
RUN apk add --no-cache python3 make g++ \
|
||||
&& npm install --production
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -12,4 +13,4 @@ RUN mkdir -p /app/data
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -5,6 +5,7 @@ const { v4: uuidv4 } = require('uuid');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const crypto = require('crypto');
|
||||
const os = require('os');
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
@@ -6000,6 +6001,22 @@ app.get('/health', (req, res) => {
|
||||
|
||||
startAutomationWorker();
|
||||
|
||||
function logRuntimeInfo() {
|
||||
let osPretty = '';
|
||||
try {
|
||||
const raw = fs.readFileSync('/etc/os-release', 'utf8');
|
||||
const match = raw.match(/^PRETTY_NAME="?(.*?)"?$/m);
|
||||
if (match && match[1]) {
|
||||
osPretty = match[1];
|
||||
}
|
||||
} catch (error) {
|
||||
// ignore
|
||||
}
|
||||
const osInfo = osPretty || `${os.platform()} ${os.release()}`;
|
||||
console.log(`Runtime: Node ${process.version}, OS ${osInfo}`);
|
||||
}
|
||||
|
||||
app.listen(PORT, '0.0.0.0', () => {
|
||||
logRuntimeInfo();
|
||||
console.log(`Server running on port ${PORT}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user