Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE 390] Production Image Caching #393

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

daphnegold
Copy link
Contributor

Summary

Fixes #390

Time to review: 10 mins

Changes proposed

This PR fixes 2 issues:

  • Installs Sharp package (and sub-dependencies) to remove error about image optimization in production using the Image component in next.js
  • Images are cached, but we have a read only root directory for Fargate tasks that prevents next.js from writing to its desired directory. Fix that by creating it then adding the nodejs user as owner of that particular directory

Context for reviewers

This one is going to be tough to test individually, but I don't see any more errors in our AWS logs. The cache issue only happens in production.

Additional information

Broken

image

Fixed

Screenshot 2023-08-21 at 12 23 01 PM

Note: appears the health check endpoint is failing now and causing the task to restart repeatedly, but that's a separate issue.

Copy link
Contributor

@SammySteiner SammySteiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was confusing. Great job!

@daphnegold daphnegold merged commit 555076d into main Aug 21, 2023
@daphnegold daphnegold deleted the daphnegold/issue-390-next-image branch August 21, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Production Image Caching issue
2 participants