implement new relic monitoring, start committing lockfile, switch to bun for newrelic branch (docker)

This commit is contained in:
Aidan 2025-02-01 19:40:56 -05:00
parent ec0e8aca94
commit 6d77b85154
6 changed files with 4122 additions and 7 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@
bun.lockb bun.lockb
node_modules/ node_modules/
public/css/styles.css public/css/styles.css
package-lock.json

View File

@ -1,8 +1,11 @@
FROM oven/bun:latest FROM node:latest
ENV NEW_RELIC_NO_CONFIG_FILE=true
ENV NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true
ENV NEW_RELIC_LOG=stdout
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json ./
RUN bun install RUN npm install
COPY . . COPY . .
RUN bun run build:css RUN npm run build:css
EXPOSE 3000 EXPOSE 3000
CMD ["bun", "run", "app.js"] CMD ["node", "app.js"]

1
app.js
View File

@ -5,6 +5,7 @@ const validator = require('validator');
const helmet = require('helmet'); const helmet = require('helmet');
var figlet = require("figlet"); var figlet = require("figlet");
const morgan = require('morgan'); const morgan = require('morgan');
require('newrelic');
const app = express(); const app = express();
const PORT = 3000; const PORT = 3000;

View File

@ -7,6 +7,7 @@ services:
- "3002:3000" - "3002:3000"
volumes: volumes:
- .:/app - .:/app
command: ["bun", "run", "app.js"]
environment: environment:
- NEW_RELIC_LICENSE_KEY=licensekeyhere
- NEW_RELIC_APP_NAME=appnamehere
- NODE_ENV=production - NODE_ENV=production

4110
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@
"build:css": "tailwindcss -i ./src/css/styles.css -o ./public/css/styles.css" "build:css": "tailwindcss -i ./src/css/styles.css -o ./public/css/styles.css"
}, },
"dependencies": { "dependencies": {
"newrelic": "latest",
"ejs": "^3.1.10", "ejs": "^3.1.10",
"express": "^4.21.2", "express": "^4.21.2",
"figlet": "^1.8.0", "figlet": "^1.8.0",