feat: Development Container#159
Conversation
This is a very similar setup to the development container that was recently pushed to `doubtfire-astro`, since this is a very similar project also being an Astro/Starlight repository.
✅ Deploy Preview for thoth-tech ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ishika021
left a comment
There was a problem hiding this comment.
I just went through the devcontainer config added in this pull request and it all looks really well thought out and it should ultimately make local development easier and more consistent for contributors.
The good stuff:
- A new .devcontainer/devcontainer.json file has been created as part of this PR which uses Docker Compose as well as forwarding port 4321, which is also a standard and clear way of doing things.
- There is also a .devcontainer/docker-compose.yml file containing proper bind mounts and a named node_modules volume which is a good pattern for a devcontainer and will help reduce problems with local environments.
- The removal of .devcontainer/Dockerfile also makes sense as the devcontainer now uses the Dockerfile from the root, making it easier to maintain a single build config.
Things to note/suggest:
- Along with the devcontainer changes, there were a few other changes committed in the PR (e.g. the regeneration of a package-lock and an upstream merge) which if possible, could have been better split into another PR, helping to keep the scope of the change focused.
- The devcontainer currently forwards port 4321, so to confirm that this is indeed the correct development port, it would be good to make sure that all the configuration files/ documentation are consistent, in case the port does change.
I think all of the changes are good, and will help to create a better experience for developers.
|
@BrianDangDev an approving review from you when possible would be greatly appreciated. |
|
Hi @SteveDala, can you check the workflow error? It seems those files have extra whitespace at the bottom, which caused the workflow to fail |
|
Thanks for the heads up @BrianDangDev, I believe the issue is that those files had no trailing empty line. This has now been fixed. Could you kick off the workflow again and approve if successful? |
|
@BrianDangDev looks like #164 (prettier lint) may have to be merged first in order to successfully pass the checks. |
|
@BrianDangDev I have resolved all build and linting issues. An approving review is still required from you to merge this change if appropriate. |


Description
The motivation behind this work is to create a reproducible environment to work on the Thoth Tech documentation. Further to not wanting to install node.js on my Windows machine, I prefer to open a Docker or development container and just go from there. This should also solve any cross-platform dependency problems among team members.
This PR is inspired by
thoth-tech/doubtfire-astro#64.Type of change
How Has This Been Tested?
astro v4.16.19will report that the site is ready athttp://localhost:4321.src/content/docsdirectory for any changes and rebuild when changes are made.Testing Checklist
[ ] Have run- This would make the diff for this change impossible to read. This needs its own PR.npm run formatnpm run buildnpm run devand/ornpm run preview, using:http://[::1]:4321Checklist