From 0885134d12402a607247cd005e1fa9fda23a5c13 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Thu, 24 Sep 2026 11:25:16 -0400 Subject: [PATCH] Add CLAUDE.md and fix out-of-date READMEs Add CLAUDE.md with repo-specific guidance plus the non-repo-specific conventions from dockstore/dockstore and dockstore/dockstore-deploy. Update README.md and DEV-README.md to reflect the removal of docker-compose.yml and the non-interactive install_bootstrap. Co-Authored-By: Claude Opus 5.5 (1M context) --- CLAUDE.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ DEV-README.md | 14 +++------- README.md | 49 +++++++++++++++------------------- 3 files changed, 100 insertions(+), 37 deletions(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6c28f8c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,74 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this repo is + +This repo holds configuration templates for running the Dockstore webservice and UI on AWS ECS/Fargate. There is no application code here. The repo contains Mustache templates, static config, Dockerfiles for the ELK logging stack, and shell scripts. Local Dockstore development belongs in the main `dockstore/dockstore` repo, not here. + +Related repos: +- `dockstore/dockstore-deploy` checks this repo out as a **git submodule**. Its `cdk-templates/dockstore` Fargate stack fills in these templates from a Secrets Manager secret (`/DeploymentConfig//BootstrapConfigFile`) that holds the same key/value pairs as `compose.config`. A new key added here therefore also has to be added to that secret in each environment. +- `dockstore/dockstore` is the webservice itself. It owns the Liquibase changelogs whose version contexts `init_migration.sh.template` lists, and the Dropwizard config schema that `web.yml.template` fills in. + +## Commands + +```bash +# Render all templates into config/ (and a few into scripts/). Requires `mustache` (Ruby gem) and `jq`. +bash install_bootstrap --script + +# Validate the rendered nginx config (this is what CI does) +docker run -v $PWD/config/nginx-conf/default.nginx_http.conf:/etc/nginx/conf.d/default.conf:ro \ + -v $PWD/config/nginx-conf/default.nginx_http.shared.conf:/etc/nginx/conf.d/default.nginx_http.shared.conf:ro \ + -v $PWD/config/nginx-conf/default.nginx_http.security.conf:/etc/nginx/conf.d/default.nginx_http.security.conf:ro \ + nginx:1.13.1 nginx -t -c /etc/nginx/nginx.conf + +# Secret scanning (also installs git-secrets hooks via husky) +npm ci +npm run install-git-secrets + +# Dev ELK logging stack (elasticsearch-logstash, logstash, kibana, elastalert) +docker compose -f docker-compose.dev.yml build +docker compose -f docker-compose.dev.yml up --force-recreate --remove-orphans +``` + +There is no test suite. CI (`.github/workflows/docker-image.yml`) runs the git-secrets scan, renders the templates with `install_bootstrap --script`, and runs `nginx -t` on the result. Run both locally to check a change. + +## How templating works + +- `dockstore_launcher_config/compose.config` is a flat JSON file of every template variable. The committed copy holds only placeholder values (`replaceme`, `foobar`). Real values are supplied at deploy time and must never be committed. +- `install_bootstrap` loads that JSON as shell variables through `jq`. It uses `UI2_HASH` to download the UI's `index.html`/`manifest.json` from `gui.dockstore.org`. It then runs `mustache compose.config