|
23 | 23 | * [Optional: Use `dev` for checks and experiments](#optional-use-dev-for-checks-and-experiments) |
24 | 24 | * [GitHub CI checks](#github-ci-checks) |
25 | 25 | * [Optional: Run Codex or Gemini (see more examples below)](#optional-run-codex-or-gemini-see-more-examples-below) |
| 26 | + * [Optional: Run code-server (VS Code in browser)](#optional-run-code-server-vs-code-in-browser) |
26 | 27 | * [Optional: Run JupyterLab](#optional-run-jupyterlab) |
27 | 28 | * [💻 AI-Powered CLI Workflow (Gemini & Codex)](#-ai-powered-cli-workflow-gemini--codex) |
28 | 29 | * [If you do not have API keys](#if-you-do-not-have-api-keys) |
@@ -76,10 +77,12 @@ Use it as-is or tailor it to match your team's development workflow. |
76 | 77 | ```text |
77 | 78 | . |
78 | 79 | ├── .github/workflows/ci.yml # GitHub CI: build dev/app, run Ruff + pytest |
| 80 | +├── .vscode/*.json.dist # VS Code / code-server editor defaults |
79 | 81 | ├── src/sample/main.py # Example application module |
80 | 82 | ├── tests/sample/test_main.py # Example pytest tests to extend in your project |
81 | | -├── Dockerfile # Multi-stage images (base, dev, vim-ide, app) |
| 83 | +├── Dockerfile # Multi-stage images (base, dev, vim-ide, code-server, app) |
82 | 84 | ├── compose.yaml # Local service orchestration for template workflows |
| 85 | +├── .env.dist # Default compose/build/runtime variables |
83 | 86 | ├── pyproject.toml # Poetry dependencies and tool configuration |
84 | 87 | ├── poetry.lock # Locked dependency graph |
85 | 88 | └── README.md # Setup and usage documentation |
@@ -113,6 +116,8 @@ cp .env.dist .env |
113 | 116 | cp .vimrc.dist .vimrc |
114 | 117 | cp .coc-settings.json.dist .coc-settings.json |
115 | 118 | docker compose build vim-ide |
| 119 | +# Optional alternative editor: |
| 120 | +# docker compose build code-server |
116 | 121 | docker compose run --rm vim-ide |
117 | 122 | ``` |
118 | 123 |
|
@@ -144,6 +149,11 @@ Set the `.env` values used by `compose.yaml` and the Docker build. Common ones: |
144 | 149 | * `POETRY_OPTIONS_DEV` — Poetry install flags for the dev image. |
145 | 150 | * `PIP_DEFAULT_TIMEOUT` — Pip network timeout (seconds). |
146 | 151 | * `JUPYTER_TOKEN` — Token for JupyterLab login. |
| 152 | +* `CODE_SERVER_EXTENSIONS` — Space-separated extension IDs preinstalled in code-server. |
| 153 | +* `CODE_SERVER_HOST` — Bind address for code-server (usually `0.0.0.0`). |
| 154 | +* `CODE_SERVER_PORT` — Port for code-server. |
| 155 | +* `CODE_SERVER_AUTH` — code-server auth mode (`password` or `none`). |
| 156 | +* `CODE_SERVER_PASSWORD` — Password used by code-server when auth is `password`. |
147 | 157 | * `OPENAI_API_KEY` — API key for Codex. |
148 | 158 | * `GEMINI_API_KEY` — API key for Gemini. |
149 | 159 |
|
@@ -189,8 +199,8 @@ docker compose run --rm poetry lock |
189 | 199 |
|
190 | 200 | > 🔄 Note: If you've changed dependencies (e.g. updated pyproject.toml or |
191 | 201 | > poetry.lock), rebuild the image(s) that install Python dependencies: |
192 | | -> `vim-ide`, `dev`, `codex`, `gemini`, `jupyterlab`, and/or `app` depending on |
193 | | -> what you run. |
| 202 | +> `vim-ide`, `dev`, `codex`, `gemini`, `code-server`, `jupyterlab`, and/or |
| 203 | +> `app` depending on what you run. |
194 | 204 |
|
195 | 205 | ```bash |
196 | 206 | docker compose build vim-ide |
@@ -236,7 +246,8 @@ docker compose run --rm dev ruff format --check |
236 | 246 | This template includes a minimal GitHub Actions workflow in |
237 | 247 | `.github/workflows/ci.yml` that: |
238 | 248 |
|
239 | | -* builds `dev` and `app` images |
| 249 | +* builds `dev`, `app`, `vim-ide`, `codex`, `gemini`, `jupyterlab`, and `code-server` |
| 250 | +* checks `vim`, `codex`, `gemini`, `jupyter-lab`, and `code-server` binaries |
240 | 251 | * runs `ruff check .` |
241 | 252 | * runs `ruff format --check .` |
242 | 253 | * runs `pytest -q` |
@@ -269,6 +280,25 @@ docker compose build gemini |
269 | 280 | docker compose run --rm gemini |
270 | 281 | ``` |
271 | 282 |
|
| 283 | +### Optional: Run code-server (VS Code in browser) |
| 284 | + |
| 285 | +Create the editor config files from dist templates (recommended): |
| 286 | + |
| 287 | +```bash |
| 288 | +mkdir -p .vscode |
| 289 | +cp .vscode/settings.json.dist .vscode/settings.json |
| 290 | +cp .vscode/extensions.json.dist .vscode/extensions.json |
| 291 | +``` |
| 292 | + |
| 293 | +```bash |
| 294 | +docker compose build code-server |
| 295 | +docker compose run --rm --service-ports code-server |
| 296 | +# Open: http://127.0.0.1:${CODE_SERVER_PORT} |
| 297 | +``` |
| 298 | + |
| 299 | +`compose.yaml` controls port/auth via `CODE_SERVER_HOST`, `CODE_SERVER_PORT`, |
| 300 | +`CODE_SERVER_AUTH`, and `CODE_SERVER_PASSWORD`. |
| 301 | + |
272 | 302 | ### Optional: Run JupyterLab |
273 | 303 |
|
274 | 304 | ```bash |
|
0 commit comments