Skip to content

Conversation

@jimmoffet
Copy link
Contributor

@jimmoffet jimmoffet commented Jun 13, 2022

Provided some local orchestration that allows us to connect the admin and redis services within this repo to one another, as well as to the notifications-api repo via docker containers. We are also making use of vscode devcontainers, which allow for hot-reloading the admin flask and node apps, without needing to install locally, restart containers or re-establish networking.

Step to set up:

NOTE: You'll only need to create the docker network once to connect both repos, using: docker network create notify-network. You'll need to install (again, only once) the Visual Studio Code Remote - Containers extension to make use of the devcontainer sugar.

NOTE: If you make a change to the Dockerfile, make sure to rebuild the correlated docker image. If you make a change to the docker-compose.devcontainer.yml file, or the .env file, make sure to rebuild the correlated container. VScode should prompt you with an actionable notification asking to rebuild the containers when it detects one of these changes, but it does not always do so reliably/predictably (it's also easy to miss these temporary toast notifications).

NOTE: The next step will fail without an .env file present at the top level of this repo ⚠️ See sample.env for details. If you ran without .env and it failed, see the note above.

Once installed, you can use command+shift+p to open the command pallet and select Remote-Containers: Open Folder in Container, then select the devcontainer-admin directory.

Vscode will build the container and establish networking. I recommend selecting "show logs" in the bottom-right. You can unhide hidden toast messages about the build by clicking the notifications bell in the far bottom-right. Once the container has finished building, you should see a "ports" tab in the terminal window (cmd-j) and it should show at least one mapped port for 6012. You should also see logs for the gulp process building out the node app.

Open a new terminal instance with the plus button and enter make run-flask. At this point, you should be able to access the notify front-end on at 0.0.0.0:6012. If you already have the notifications-api up and running and you see the site without an error message, it has successfully connected locally to the notifications api 🎉

@hartsick hartsick self-requested a review June 16, 2022 16:17
Copy link
Contributor

@hartsick hartsick left a comment

Choose a reason for hiding this comment

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

We paired through setting this up locally, and were able to get a development environment working on both machines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants