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

feat(agora): change agora-api to construct mongo URI from host, username, password, port, and DB name env variables (AG-1592) #2967

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

hallieswan
Copy link
Collaborator

@hallieswan hallieswan commented Jan 15, 2025

Description

Changes agora-api to construct the mongo URI with host, username, password, port, and DB name env variables, rather than specifying the URI directly in the env file. Future PR in agora-infra-v3 will set the environment variables to secrets allowing connection to existing DocumentDB instances, as described here.

Related Issue

Changelog

  • Changes environment variables for agora-api
  • Updates agora_version in agora-app/config to align with latest deployment tag
  • Adds env variables missing from agora-app .env.example, which are used to populate agora-app config.json
  • Fixes healthcheck for agora-apex -- container does not include curl, so use wget instead

Validation

  1. Update apps/agora/api/.env and apps/agora/app/.env to create new environment variables specified in .env.example files
  2. Stop any running containers: workspace-docker-stop.
  3. Start agora stack: nx run agora-apex:serve-detach.
  4. Navigate to teams page: localhost:8000/teams.
  5. Confirm that teams and user images are displayed

@hallieswan hallieswan marked this pull request as ready for review January 15, 2025 22:59
@hallieswan hallieswan requested a review from a team as a code owner January 15, 2025 22:59
@hallieswan hallieswan self-assigned this Jan 15, 2025
apps/agora/api/src/api.ts Outdated Show resolved Hide resolved
apps/agora/api/src/api.ts Outdated Show resolved Hide resolved
@hallieswan hallieswan changed the title feat(agora): change agora-api to construct mongo URI from host, username, and password env variables (AG-1592) feat(agora): change agora-api to construct mongo URI from host, username, password, port, and DB name env variables (AG-1592) Jan 16, 2025
Copy link
Contributor

@sagely1 sagely1 left a comment

Choose a reason for hiding this comment

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

LGTM! We can further optimize as per Thomas's suggestions in another PR if you'd like.

Copy link
Member

@tschaffter tschaffter left a comment

Choose a reason for hiding this comment

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

I followed the testing instructions, including updating the config files. I confirm that the team members are visible on the team page.

@tschaffter tschaffter merged commit 7fbf496 into Sage-Bionetworks:main Jan 16, 2025
15 of 16 checks passed
@hallieswan hallieswan deleted the agora/AG-1592 branch January 16, 2025 23:38
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.

4 participants