diff --git a/.gitignore b/.gitignore index d840e32..f8b6791 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /node_modules/* /tmp/* .vimrc +.env diff --git a/Dockerfile b/Dockerfile index f1ffdd0..07403b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.18.2-alpine +FROM node:22.9.0-alpine3.20 EXPOSE 3000 @@ -20,4 +20,4 @@ RUN npm install #RUN cd /usr/src/app/CodeMirror && npm run build # Use nodemon to start app. -CMD [ "nodemon" ] +CMD [ "nodemon", "--env-file=.env", "server.js" ] diff --git a/server.js b/server.js index 7c20769..dae1369 100644 --- a/server.js +++ b/server.js @@ -19,7 +19,7 @@ var db = require('./db'); var Session = require('express-session'); var SessionStore = require('session-file-store')(Session); var session = Session({ - secret: 'here kitty kitty', + secret: process.env.SESSION_SECRET, resave: false, saveUninitialized: false, cookie: { sameSite: true, secure: true },