Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Add terms of service to included files for docker image #662

Closed
wants to merge 1 commit into from

Conversation

AetherUnbound
Copy link
Contributor

Description

This PR addresses a minor issue wherein the terms of service document was not available within the Docker container, and thus couldn't be served by nginx in production.

Testing Instructions

  1. Run just build
  2. Run docker run --entrypoint='' --rm -it openverse-api:latest ls
  3. Observe that terms_of_service.html is present within the container.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@AetherUnbound AetherUnbound requested a review from a team as a code owner April 29, 2022 22:39
@AetherUnbound AetherUnbound added 💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon labels Apr 29, 2022
@dhruvkb
Copy link
Member

dhruvkb commented Apr 30, 2022

While this PR does work as intended, based on the minified nature of the file and this comment

<!-- saved from url=(0065)file:///home/alden/.cache/.fr-kXscqX/CCAPItermsandconditions.html -->

it seems like the file is auto-generated. I'm not sure if it should even be tracked in VCS.

@AetherUnbound
Copy link
Contributor Author

Here's the file in prod now: https://api.openverse.engineering/terms_of_service.html
It looks like there are a bunch of places where we could change CC Catalog as well. That said, based on our infrastructure repository, the file is served directly from the repo (it's not minified or pulled in from anywhere). Do you have any thoughts or suggestions as to where we should move this?

@dhruvkb
Copy link
Member

dhruvkb commented May 3, 2022

Imo, we should convert this into a markdown file and serve it inside the ReDoc view itself, similar to how we have these other sections in the API documentation.

Screenshot 2022-05-03 at 5 26 46 PM

This has the main advantage of being immediately discoverable (lives with the API docs) and very readable in both the web UI as well as in the raw Markdown format (which the minified HTML lacks). Also, it can be Git-tracked which is not true for minified auto-generated HTML files.

@sarayourfriend
Copy link
Contributor

That's a great idea Dhruv!

@AetherUnbound
Copy link
Contributor Author

Agreed! But bummer, the terms_of_service field explicitly has to be a URL: https://swagger.io/specification/
Since we have the sections you described as part of our docs' README.md file, we'll have to find another way for Swagger to serve this.

@sarayourfriend
Copy link
Contributor

Can't it point to a URL... that it itself generates? Or... 🤔 It could just be the fully qualified URL to the production place where it will exist?

@AetherUnbound
Copy link
Contributor Author

Yea, exactly that! I just need to figure out how to get a "regular page" up in Swagger, I haven't used it very much 😅

@sarayourfriend
Copy link
Contributor

Oh you know, I was assuming we'd add it to the MyST docs, not the swagger docs, sorry!

@AetherUnbound
Copy link
Contributor Author

AetherUnbound commented May 4, 2022

🤦🏼‍♀️ I was assuming it had to be in the swagger docs! Since it's literally just a link, we could 1000% make it the MyST docs! So much easier 🚀

@sarayourfriend
Copy link
Contributor

Nice!

@AetherUnbound
Copy link
Contributor Author

The changes are pretty significant and result in a very different PR, so I'm going to close this one and open a new one.

@AetherUnbound AetherUnbound mentioned this pull request May 4, 2022
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants