Update stderr and stdout to files with timestamps

This commit is contained in:
Skylar Grant 2023-05-08 09:07:44 -04:00
parent 7121ab5390
commit 0bdca58d03

View File

@ -5,4 +5,5 @@ WORKDIR /usr/src/app
COPY package.json ./ COPY package.json ./
RUN npm install RUN npm install
COPY . . COPY . .
CMD ["/bin/sh", "-c", "node main.js 2> /logs/error.log 1> /logs/silvanus.log"] # CMD ["/bin/sh", "-c", "node main.js 2> /logs/silvanus.err 1> /logs/silvanus.log"]
CMD ["/bin/sh", "-c", "node main.js 2> /logs/silvanus-$(date +%Y-%m-%d_%H-%M-%S).err 1> /logs/silvanus-$(date +%Y-%m-%d_%H-%M-%S).log"]