Commit adc84259 authored by Mark Harding's avatar Mark Harding

(chore): implement pm2 runtime

No related merge requests found
Pipeline #116649386 running with stages
......@@ -5,6 +5,10 @@ FROM node:13-alpine
COPY . /dist
CMD node "--max-old-space-size=2048" /dist/server
RUN npm install pm2 -g
CMD pm2-runtime /dist/server \
--max-memory-restart 1900M \
--instances 2
VOLUME ["/dist"]
\ No newline at end of file
......@@ -136,11 +136,11 @@ const cache = () => {
};
app.get('/node-cache-stats', (req, res) => {
res.sendResponse(myCache.getStats());
res.send(myCache.getStats());
});
// All regular routes use the Universal engine
app.get('*', (req, res) => {
app.get('*', cache(), (req, res) => {
const http =
req.headers['x-forwarded-proto'] === undefined
? 'http'
......
Please register or to comment