-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add rudimentary dev container setup #1280
base: main
Are you sure you want to change the base?
Conversation
Deploying opensafely-docs with Cloudflare Pages
|
ca844c8
to
8c54f96
Compare
bf89e6a
to
2a4ec64
Compare
2a4ec64
to
c97960d
Compare
0a7fbd0
to
32bcaee
Compare
This configuration works as is in a local dev container, and makes the port accessible. I'm having real trouble trying to get Codespaces to make the port available. You can There is this discussion: https://github.com/orgs/community/discussions/61154 which might be related. I'm not sure. I'm similarly having problems even in Codespaces from repositories that I know full well used to work like the research-template and running There's also mention of an new and forthcoming port forwarding mechanism: https://github.com/orgs/community/discussions/57596 So maybe return to this in a few weeks and try again. I'd prefer to having it working in Codespaces, and be able to validate that myself, before merging. |
739a40c
to
ea934df
Compare
This allows someone to work on the docs via Codespaces or in VSCode using the dev containers feature. Current issues: * This builds `just` via `cargo` because Debian doesn't have a package. We could instead use the install script for `just` or download a specific version from GitHub instead, which would speed up the build. It takes a while to compile everything. * We have to workaround `PYTHON_VERSION` being set to `X.Y.Z` in `/etc/environment`. In the `justfile`, it seems to assume that the `PYTHON_VERSION` as configured by someone explicitly is of the form `pythonX.Y.Z` — I'm not sure if this is a mistake or not.
This is far quicker than compiling, especially in Codespaces. Sadly there is no obvious way of validating the downloaded binary. It would be preferable to use a package from an operating system repository, but `just` is not packaged for Debian yet.
ea934df
to
0b1bd35
Compare
c84df35
to
a0b3557
Compare
7da74b3
to
a0b3557
Compare
To avoid constant rebuilds while editing.
24b247c
to
79c6f54
Compare
This reverts commit 944033b.
I should try this again, as I'd had similar problems with the team manual, and that just worked when I tried it with Codespaces more recently. |
Fixes #1047.
This allows someone to work on the docs via Codespaces or in VSCode using the dev containers feature.
Current issues:
This buildsSwitched to downloading the latest release from GitHub which is far quicker; unfortunately there are no checksums/signature to validate the download against. It would be better to use a packaged version.just
viacargo
because Debian doesn't have a package. We could instead use the install script forjust
or download a specific version from GitHub instead, which would speed up the build. It takes a while to compile everything.PYTHON_VERSION
being set toX.Y.Z
in/etc/environment
. In thejustfile
, it seems to assume that thePYTHON_VERSION
as configured by someone explicitly is of the formpythonX.Y.Z
— I'm not sure if this is a mistake or not.