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

fix gitpod covers #9869

Merged
merged 2 commits into from
Sep 11, 2024
Merged

fix gitpod covers #9869

merged 2 commits into from
Sep 11, 2024

Conversation

RayBB
Copy link
Collaborator

@RayBB RayBB commented Sep 11, 2024

Closes #5834

Technical

A pretty simple fix at the end of the day, just injecting the right domain in to the config in the gitpod setup

Testing

  1. Start a gitpod of this PR at https://gitpod.io/#https://github.com/internetarchive/openlibrary/pull/9869
  2. Upload an image
  3. See the image works

Screenshot

Stakeholders

@cdrini
Copy link
Collaborator

cdrini commented Sep 11, 2024

Backup:

    # Replace coverstore_public_url with the URL of the GitPod port
    sed -i "s|coverstore_public_url: .*|coverstore_public_url: $(gp url 7075)|" conf/openlibrary.yml

@RayBB
Copy link
Collaborator Author

RayBB commented Sep 11, 2024

@cdrini I think I came up with a decent solution :)

When the env/web.env file is missing nothing changes.
When it exists it's used.
env/ was already in the .gitignore so that's where I chose to put it.
Now we have a nice way to override env variables without changing the yaml :)

Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Nice lgtm! Ray confirmed this works in gitpod!

(Side note: I like this strategy quite a bit... in some universe it might be nice to move all our openlibrary.yml configs to environment variables, it would make for significantly easier configuring! CC @scottbarnes )

@cdrini cdrini self-assigned this Sep 11, 2024
@cdrini cdrini merged commit f265afd into master Sep 11, 2024
4 checks passed
@cdrini cdrini deleted the fix-gitpod-covers branch September 11, 2024 18:24
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.

Gitpod not displaying covers
2 participants