From 52244556b170ecf46c7f3fc2f2e30279323d3768 Mon Sep 17 00:00:00 2001 From: Jody Date: Thu, 5 Oct 2023 14:00:34 -0400 Subject: [PATCH] Remove sqlite3 since no longer used; remove vim and git packages since i don't need hot-reload from running container anymore (and to make image smaller; specify nodemon version to be concurrent w/rest of old stuff in order to do re-builds. --- Dockerfile | 4 +--- package.json | 1 - server.js | 10 ---------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fddb38e..f74785f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,7 @@ WORKDIR /usr/src/app RUN mkdir -p /usr/src/app/db VOLUME ["/usr/src/app/db"] -RUN npm install -g nodemon -RUN apt-get update && apt-get install -y vim git -COPY .vimrc /root/.vimrc +RUN npm install -g nodemon@1.17.3 COPY package.json /usr/src/app/ COPY . /usr/src/app diff --git a/package.json b/package.json index beafa25..bb296a3 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "moment-timezone": "^0.4.0", "nodemailer": "^1.3.4", "pg": "^4.4.2", - "sqlite3": "^3.0.8", "winston": "^2.1.1" }, "scripts": { diff --git a/server.js b/server.js index fb07d1b..16cf04c 100644 --- a/server.js +++ b/server.js @@ -23,16 +23,6 @@ var mailOptions = { }; -var file = "./db/alertmon.db"; -var exists = fs.existsSync(file); - -if(!exists) { - console.log("Creating DB file."); - fs.openSync(file, "w"); -} - -var sqlite3 = require("sqlite3").verbose(); -var db = new sqlite3.Database(file); var pg = require("pg"); var conString = "postgres://alertmon:alertmon@db/alertmon";