Skip to content

ci: add devcontainers#59

Merged
barredterra merged 8 commits into
developfrom
devcontainers
Jul 13, 2026
Merged

ci: add devcontainers#59
barredterra merged 8 commits into
developfrom
devcontainers

Conversation

@barredterra

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge — this adds a developer tooling layer only, touching no application or production code.

All changes are confined to the new .devcontainer directory. The script is defensively written with set -euo pipefail, an EXIT trap, idempotent step guards, and the MariaDB readiness race condition flagged in prior review threads is now addressed with a proper healthcheck. The redis:alpine image tag remains unpinned (noted in prior threads), but this only affects devcontainer reproducibility, not application correctness.

No files require special attention. setup.sh is the most complex piece but is well-guarded throughout.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Dev as Developer (VS Code)
    participant DC as devcontainer.json
    participant Compose as docker-compose.yml
    participant MDB as mariadb (healthcheck)
    participant RC as redis-cache
    participant RQ as redis-queue
    participant FC as frappe container
    participant SH as setup.sh

    Dev->>DC: Open devcontainer
    DC->>Compose: docker compose up
    Compose->>MDB: start + healthcheck.sh
    Compose->>RC: start
    Compose->>RQ: start
    MDB-->>Compose: service_healthy
    Compose->>FC: start (depends_on: all ready)
    DC->>FC: postCreateCommand → bash setup.sh
    FC->>SH: ensure_bench()
    Note over SH: Init bench into scratch dir,<br/>cp to BENCH_ROOT,<br/>recreate venv with uv
    SH->>SH: "configure_bench() - db_host, redis_*, ports"
    SH->>SH: "install_editor_config() - copy .vscode/*.json"
    SH->>SH: link_app() - bench get-app --soft-link
    SH->>MDB: create_site() - bench new-site
    SH->>FC: install_app() - bench install-app ask_alyf
    SH->>FC: finalize() - requirements → build → migrate
    SH-->>Dev: Done. See README.md
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Dev as Developer (VS Code)
    participant DC as devcontainer.json
    participant Compose as docker-compose.yml
    participant MDB as mariadb (healthcheck)
    participant RC as redis-cache
    participant RQ as redis-queue
    participant FC as frappe container
    participant SH as setup.sh

    Dev->>DC: Open devcontainer
    DC->>Compose: docker compose up
    Compose->>MDB: start + healthcheck.sh
    Compose->>RC: start
    Compose->>RQ: start
    MDB-->>Compose: service_healthy
    Compose->>FC: start (depends_on: all ready)
    DC->>FC: postCreateCommand → bash setup.sh
    FC->>SH: ensure_bench()
    Note over SH: Init bench into scratch dir,<br/>cp to BENCH_ROOT,<br/>recreate venv with uv
    SH->>SH: "configure_bench() - db_host, redis_*, ports"
    SH->>SH: "install_editor_config() - copy .vscode/*.json"
    SH->>SH: link_app() - bench get-app --soft-link
    SH->>MDB: create_site() - bench new-site
    SH->>FC: install_app() - bench install-app ask_alyf
    SH->>FC: finalize() - requirements → build → migrate
    SH-->>Dev: Done. See README.md
Loading

Reviews (5): Last reviewed commit: "refactor: rename test-site-dev to test_s..." | Re-trigger Greptile

Comment thread .devcontainer/docker-compose.yml Outdated
Comment thread .devcontainer/docker-compose.yml
Comment thread .devcontainer/setup.sh Outdated
@barredterra
barredterra merged commit c66cc31 into develop Jul 13, 2026
5 checks passed
@barredterra
barredterra deleted the devcontainers branch July 13, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant