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

chore: update devcontainer to share same network as api/admin #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andrewleith
Copy link
Member

Summary | Résumé

This PR updates the repo's devcontainer, modeled after the one in notification-admin.

It adds a network named notify-network that each component will use to communicate locally.

Test instructions | Instructions pour tester la modification

  • Make sure DD-API can still send files for you locally

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

version: '3'
services:
# Update this to the name of the service you want to work with in your docker-compose.yml file
notify-ddapi:
Copy link
Member

Choose a reason for hiding this comment

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

It works as is? i.e. you didn't have to define a service attribute in the devcontainer.json file? (I didn't try without it -- I guess it assumes it and use it correctly).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it did work fine, but I didnt realize that was over there. I will look more closely at the other repos and make this match. Its too bad there is linting on these type of files since there are clearly dependencies between them!

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
expose:
- "7000"
Copy link
Member

Choose a reason for hiding this comment

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

Did you check if there was a conflict with port 7000 when bringing up this devcontainer into vscode? It is possible there might be a conflict and a new port from 7000->random port might get created. In the API, we removed the forward port in devcontainer.json if I am not mistaken.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll take a look. It all worked fine when I rebuilt the container so I assumed it was OK.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removing the forwarded port section makes it not work at all 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Added it back, its all working locally now. Did you want to try it out before I merge?

Copy link
Member

@jimleroyer jimleroyer left a comment

Choose a reason for hiding this comment

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

Left two comments but if might be working as-is. Just want to make sure the config is correct.

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.

2 participants