Skip to content

Commit 8de0a7f

Browse files
yahondaclaude
andcommitted
Document GitHub Codespaces support
The repository's existing devcontainer already runs on GitHub Codespaces, but two small improvements make the experience smoother: - .devcontainer/devcontainer.json: declare hostRequirements (4 cpu / 8 GB RAM / 32 GB storage) so the Codespaces "Create codespace" picker defaults to a machine large enough to run Oracle Database Free. The default 2 cpu / 4 GB machine is too small to start Oracle reliably. hostRequirements is ignored by local Dev Containers, so this is a Codespaces-only nudge. - CONTRIBUTING.md: add a "GitHub Codespaces" subsection under the existing "Development with devcontainer" section, describing the one-click flow and the machine-size requirement. No source, CI, or other .devcontainer/ files are touched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4ea6c54 commit 8de0a7f

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"dockerComposeFile": "docker-compose.yml",
44
"service": "app",
55
"workspaceFolder": "/workspaces/ruby-plsql",
6+
"hostRequirements": {
7+
"cpus": 4,
8+
"memory": "8gb",
9+
"storage": "32gb"
10+
},
611
"features": {
712
"ghcr.io/rails/devcontainer/features/ruby:2": {
813
"version": "4.0.4"

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,35 @@ complete development environment with Oracle Database and all required
2828
dependencies pre-configured. It supports both x64 and ARM64 hosts, and
2929
is the recommended way to work on ruby-plsql.
3030

31+
### GitHub Codespaces
32+
33+
You can also work on ruby-plsql without installing Docker or VS Code
34+
by launching a [GitHub Codespace](https://github.com/features/codespaces),
35+
which uses the same devcontainer configuration:
36+
37+
1. On the repository page on GitHub, click **Code → Codespaces → Create
38+
codespace on master** (or on your fork's topic branch).
39+
2. Pick a machine type with **at least 4 cores and 8 GB RAM** — Oracle
40+
Database Free will not run reliably on the 2-core / 4 GB default.
41+
The Codespaces "Create" picker honours the `hostRequirements` declared
42+
in `.devcontainer/devcontainer.json`, so 4-core / 8 GB is the default
43+
suggestion.
44+
3. Wait for the Codespace to finish building. The same
45+
`initializeCommand` and `postCreateCommand` scripts run as for local
46+
Dev Containers: the Oracle server's timezone file is extracted,
47+
Oracle Free starts, `ORA_TZFILE` is pointed at the matching file to
48+
avoid `ORA-01805`, and `ci/setup_accounts.sh` provisions the `hr`
49+
and `arunit` users.
50+
4. Once setup completes, run the suite the same way as locally:
51+
52+
```sh
53+
bundle exec rake spec
54+
```
55+
56+
The first-time build takes several minutes (Oracle image pull +
57+
Instant Client setup + `bundle install`). Subsequent starts of the
58+
same Codespace are much faster.
59+
3160
### Prerequisites
3261

3362
- [Docker](https://www.docker.com/get-started) installed and running

0 commit comments

Comments
 (0)