Update dev container#3
Conversation
- Build from app container - Add debugging/testing support in VS Code - Add Python code quality tooling
| "postCreateCommand": [ | ||
| "/bin/bash", | ||
| ".devcontainer/postCreate.sh" | ||
| ], |
There was a problem hiding this comment.
I changed this from postAttachCommand to postCreateCommand after stumbling into this old SO thread that Aidan Feldman had commented on a while ago. I can't recall what minor build issue led me there, but I got past it.
Anyway, a commenter suggested that postCreate would be better since it should only need to run once when the devcontainer is (re)built. This works fine for me, but I admittedly didn't look into it any further to see if there's a reason we wouldn't want to do it post-create.
| rev: v0.48.0 | ||
| hooks: | ||
| - id: markdownlint | ||
| language_version: system |
There was a problem hiding this comment.
This was a trick needed to get this to install on Alpine (in addition to installing node and npm in the Dockerfile).
| command: serve --dev-addr "0.0.0.0:8001" | ||
| ports: | ||
| - "8000" | ||
| - "8001" | ||
| volumes: |
There was a problem hiding this comment.
8001 matches what the Benefits does. I think switching to 8001 in template-devcontainer would be worthwhile, since 8000 is the default port for a lot of services that might be run for the primary purpose of your dev container.
Necessary to be able to commit from within it.
PR 3 of ??
This PR updates the dev container config that we started with from template-devcontainer to:
Testing
If you've already successfully tested PR #2 (the bare app container), the application can now be run in the devcontainer. On this branch
You should see output in a new terminal indicating that the app is now running, and you should now be able to invoke it in your Slack test workspace! Try the
/definecommand to confirm.You can also now use the VS Code Testing pane to run the tests.
Other notes
pyproject.toml. Not sure if there's value in packaging this one up in the same way as Benefits?