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 428d67b commit ad309d3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,9 @@ 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
#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
#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 >> $LOG_PATH 2>&1"]
CMD ["node /app/index.js"]

0 comments on commit ad309d3

Please sign in to comment.