File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ RUN --mount=type=cache,target=.npm \
25
25
npm set cache .npm && \
26
26
npm ci && chown -R node:node ./node_modules
27
27
28
- # Add a cronjob for log rotation and build the project
29
- 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 && \
30
- chmod 644 /usr/src/app/docker/configuration/logrotate.conf && \
31
- npm run build && chown -R node:node .next
28
+ # Add some cronjobs for automated tasks
29
+ 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
32
30
33
31
# Use non-root user
34
32
USER node
35
33
36
- # Remove all development dependencies
37
- RUN npm prune --production
34
+ # Prepare project files and configuration to be built
35
+ RUN npm run build && npm prune --production && \
36
+ chmod +x ./docker/scripts/entrypoint.sh && \
37
+ chmod 644 /usr/src/app/docker/configuration/logrotate.conf
You can’t perform that action at this time.
0 commit comments