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

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
.idea/
bun.lockb
node_modules/
public/css/styles.css
package-lock.json
public/css/styles.css

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
COPY package.json ./
RUN bun install
RUN npm install
COPY . .
RUN bun run build:css
RUN npm run build:css
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');
var figlet = require("figlet");
const morgan = require('morgan');
require('newrelic');
const app = express();
const PORT = 3000;

View File

@ -7,6 +7,7 @@ services:
- "3002:3000"
volumes:
- .:/app
command: ["bun", "run", "app.js"]
environment:
- NEW_RELIC_LICENSE_KEY=licensekeyhere
- NEW_RELIC_APP_NAME=appnamehere
- 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"
},
"dependencies": {
"newrelic": "latest",
"ejs": "^3.1.10",
"express": "^4.21.2",
"figlet": "^1.8.0",