Skip to content

Commit

Permalink
Updates dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Jan 25, 2025
1 parent 9cc03ef commit 428d67b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,11 @@ RUN node ./app/documentation/build/index.js --no-watch
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:8080/health || exit 1

# Use an environment variable for flexibility
ENV LOG_PATH=/app/data/logs/docker/app.log

# Ensure the logfile directory exists with proper permissions
RUN mkdir -p /app/data/logs/docker && chmod -R 0755 /app/data/logs/docker

# Redirect logs to a file
CMD ["sh", "-c", "node ./app/index.js >> ./data/logs/app.log 2>&1"]
CMD ["sh", "-c", "node /app/index.js >> $LOG_PATH 2>&1"]

0 comments on commit 428d67b

Please sign in to comment.