agentleFS
aiqadamaiqadam/qadam-flow/.agents/skills/local-docker-deploy/SKILL.md

local-docker-deploy

Skill5 starsChanged 38 days agoMITView on GitHub

Runs the Qadam Flow stack locally in Docker via run.sh or docker compose. Use when you need the app running on localhost:8080 to verify a change by hand, when you are touching run.sh, docker-compose.yml, the Dockerfile or docker-entrypoint.sh, or when debugging a container, migration or environment-variable problem in a local deployment.

  • Pipes a download into a shell
  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default path — pull from the registry, no source build:

    line 10

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Local Docker Deploy

Quick Start

Default path — pull from the registry, no source build:

./run.sh
# or from outside the repo:
curl -fsSL https://flow.aiqadam.org/run.sh | sh
# App: http://localhost:8080

The script writes a fresh .env next to docker-compose.yml, pulls ghcr.io/aiqadam/qadam-flow:latest, brings up the stack, and waits for the API. Re-running it is idempotent.

Build from local source instead of pulling:

docker build --build-arg SKIP_SSL_VERIFY=true \
  --build-arg PLATFORM_VERSION="$(node tools/ci/compute-main-version.mjs --counter 0)" \
  -t ghcr.io/aiqadam/qadam-flow:latest .
docker compose up -d

PLATFORM_VERSION makes the local image report a main-style prerelease (<next>-main.0, below every CI build of the same line) instead of the last release it is not (ADR-0001, #798). Leave it out and the image reports the root package.json, the last release.

docker-compose.yml reads the image name from $QADAM_FLOW_IMAGE (default ghcr.io/aiqadam/qadam-flow:latest). Tag a local build with that name (or override the env var) so the registry pull is skipped.

Stack

  • app (port 8080:80) — API + frontend, a single Node process under tini
  • worker ×5 — BullMQ job workers
  • postgres — pgvector/pgvector:0.8.7-pg18, data in the pgdata volume. An install from before #611 also has postgres_data with its PostgreSQL 14 data: run.sh dumps and restores it into pgdata and keeps it for rollback, and the service's entrypoint refuses to start next to it until that has happened (docs/install/guides/upgrade-postgres.mdx)
  • redis — valkey/valkey:8.1.10 (Valkey, the BSD-licensed Redis fork; the service, volume and AP_REDIS_* names stay redis)

Key ENV vars

  • AP_ENVIRONMENT=prod (use dev only to opt into dev seeds)
  • SKIP_SSL_VERIFY=true build arg — for VPN/proxy environments with SSL interception
  • QADAM_FLOW_IMAGE — override the image tag picked up by docker-compose.yml

Reset

docker compose down -v   # remove volumes (clean DB)
./run.sh                 # or docker compose up -d

Useful one-liners

  • docker compose logs -f app worker — tail app + worker output
  • ./run.sh (or curl -fsSL https://flow.aiqadam.org/run.sh | sh from the directory containing qadam-flow/) — upgrade: refreshes docker-compose.yml, keeps .env, pulls and restarts. docker compose pull && docker compose up -d alone updates only the app image and leaves Postgres/Redis on whatever images the existing compose file pins
  • docker exec postgres psql -U postgres -d qadam_flow — open a psql shell

Known Issues Fixed in Local Build

  • Missing entities: ConcurrencyPoolEntity, ProjectRoleEntity — restored after EE removal
  • Project controller/module deleted during EE cleanup — GET /v1/projects returns 404 without it
  • Authorization: UserPrincipal JWT has no projectId — fixed to check platform membership via DB
  • Baseline migration not idempotent — added IF NOT EXISTS and EXCEPTION WHEN duplicate_object
  • en_natural collation missing — added CREATE COLLATION before qadam_metadata table, guarded with EXCEPTION WHEN feature_not_supported for Postgres builds without ICU

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.