Skip to content

Commit

Permalink
Fixed script execution permissions for Docker image entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Mar 8, 2025
1 parent 8968228 commit 01bc32f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker/scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ RUN --mount=type=cache,target=.npm \
npm set cache .npm && \
npm ci && chown -R node:node ./node_modules

# Add a cronjob for log rotation and build the project
RUN echo "0 0 * * * logrotate -f /usr/src/app/docker/configuration/logrotate.conf -s /usr/src/app/docker/configuration/logrotate.status > /dev/null 2>&1" >> /var/spool/cron/crontabs/node && \
chmod 644 /usr/src/app/docker/configuration/logrotate.conf && \
npm run build && chown -R node:node .next
# Add some cronjobs for automated tasks
RUN echo "0 0 * * * logrotate -f /usr/src/app/docker/configuration/logrotate.conf -s /usr/src/app/docker/configuration/logrotate.status > /dev/null 2>&1" >> /var/spool/cron/crontabs/node

# Use non-root user
USER node

# Remove all development dependencies
RUN npm prune --production
# Prepare project files and configuration to be built
RUN npm run build && npm prune --production && \
chmod +x ./docker/scripts/entrypoint.sh && \
chmod 644 /usr/src/app/docker/configuration/logrotate.conf

0 comments on commit 01bc32f

Please sign in to comment.