Skip to content

Commit 59dbeac

Browse files
committed
Updated cron actions to run via www-data user
Think the cron action running as root is the cause of root-owned cache files appearing in the app, causing permission issues when attempted to write into the same folder by the nginx/worker process. This changes the cron setup to load the cron command for the www-data user instead. Related to #24
1 parent 7b73cca commit 59dbeac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docker/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ COPY --from=1 /app/vendor /app/vendor
3636
# Then run any app-side commands
3737
RUN cp docker/.env.container /app/.env && \
3838
cp docker/nginx.conf /etc/nginx/sites-enabled/rss.conf && \
39-
cp docker/cron /etc/cron.d/rss-cron && \
4039
rm /etc/nginx/sites-enabled/default && \
4140
chmod +x /app/docker/run.sh && \
42-
chmod 0644 /etc/cron.d/rss-cron && \
43-
crontab /etc/cron.d/rss-cron && \
41+
crontab -u www-data /app/docker/cron && \
4442
php artisan key:generate && \
4543
php artisan route:cache
4644

0 commit comments

Comments
 (0)