Skip to content

Commit

Permalink
Updated cron actions to run via www-data user
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ssddanbrown committed Jan 21, 2024
1 parent 7b73cca commit 59dbeac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ COPY --from=1 /app/vendor /app/vendor
# Then run any app-side commands
RUN cp docker/.env.container /app/.env && \
cp docker/nginx.conf /etc/nginx/sites-enabled/rss.conf && \
cp docker/cron /etc/cron.d/rss-cron && \
rm /etc/nginx/sites-enabled/default && \
chmod +x /app/docker/run.sh && \
chmod 0644 /etc/cron.d/rss-cron && \
crontab /etc/cron.d/rss-cron && \
crontab -u www-data /app/docker/cron && \
php artisan key:generate && \
php artisan route:cache

Expand Down

0 comments on commit 59dbeac

Please sign in to comment.