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

Correct docker repository for the ingestion server, update docs #458

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

AetherUnbound
Copy link
Contributor

Description

This PR corrects the docker repository name used in production for the ingestion server. This format changed as a part of #437. It also adds a way to easily override the desired tag using an environment variable (in this case, in the local .env file on production). This way we can specify which version we want to pull/run without having to update the file on every version bump.

Lastly, I added some documentation to the DNS segment based on discussion in #346.

Testing Instructions

  1. cd ingestion_server
  2. docker-compose pull (optionally setting the IMAGE_TAG variable to a specific version tag, e.g. v2.1.1)
  3. docker-compose up -d

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 January 6, 2022 01:37
@AetherUnbound AetherUnbound requested review from zackkrida and obulat and removed request for a team January 6, 2022 01:37
@AetherUnbound AetherUnbound added 💻 aspect: code Concerns the software code in the repository 📄 aspect: text Concerns the textual material in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Jan 6, 2022
@AetherUnbound AetherUnbound requested a review from a team January 6, 2022 01:37
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

TIL about environment variable interpolation inside docker-compose.yml! Very cool 👍

ingestion_server/docker-compose.yml Outdated Show resolved Hide resolved
@AetherUnbound AetherUnbound removed the 📄 aspect: text Concerns the textual material in the repository label Jan 6, 2022
@AetherUnbound
Copy link
Contributor Author

TIL about environment variable interpolation inside docker-compose.yml! Very cool +1

We were trying to come up with a solution on a different project for pinning the version in the prod compose file without having to change the text and this fit the bill perfectly!

@obulat
Copy link
Contributor

obulat commented Jan 6, 2022

When running docker-compose pull, I am getting this error:
open ...openverse-api/ingestion_server/.env: no such file or directory . Do I need to create a .env file before running?

I just copied env.docker as .env and it seems to work. Edited: It does work, and the container runs fine:

docker-compose up -d
[+] Running 2/2
 ⠿ Network ingestion_server_default               Created                  0.0s
 ⠿ Container ingestion_server_ingestion_server_1  Started                  0.5s

Is the container name supposed to have ingestion_server repeated twice? Or is it because I ran it from ingestion_server directory?

@AetherUnbound
Copy link
Contributor Author

@obulat you can also create the .env files with just env, although you shouldn't need to have them in order to run docker-compose pull 🤔 I'll look into that!

@obulat
Copy link
Contributor

obulat commented Jan 6, 2022

I also might have had a very old version of api locally...

@AetherUnbound
Copy link
Contributor Author

Oh just kidding, it absolutely is expecting a .env file. This is for use in production so those values will need to be overridden anyway

@AetherUnbound AetherUnbound force-pushed the hotfix/copy-files-into-image branch from d726ad7 to fe023ea Compare January 13, 2022 18:05
@AetherUnbound AetherUnbound force-pushed the bugfix/prod-image-name branch from 0e9d2df to 90e3d2d Compare January 13, 2022 18:06
Base automatically changed from hotfix/copy-files-into-image to main January 13, 2022 18:14
@AetherUnbound AetherUnbound force-pushed the bugfix/prod-image-name branch from 90e3d2d to 14376f8 Compare January 13, 2022 18:14
@AetherUnbound AetherUnbound merged commit 7798f40 into main Jan 13, 2022
@AetherUnbound AetherUnbound deleted the bugfix/prod-image-name branch January 13, 2022 18:25
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: high Stalls work on the project or its dependents
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants