Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ db.sqlite3
.venv/
venv/
.DS_Store

# Never let a locally built image embed the working-only directories. The CI
# build starts from a clean checkout so it never sees these, but `build: .`
# from a developer's tree would copy them straight into the image — and that
# image is one `docker push` away from being public.
.env
/local/
.claude/
.continue/
.playwright-mcp/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ venv/
/seed/demo/.extract/
/*.png
*.code-workspace
# Developer build/live-reload override — copied from the .example, kept local.
docker-compose.override.yml

# Local, never-committed working area (strategy notes, drafts, scratch).
/local/
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,19 @@ them, and it auto-detects your browser's language on first visit.
docker compose up
```

This pulls the published image
([`jiniie/cli2ui`](https://hub.docker.com/r/jiniie/cli2ui), amd64 and arm64) —
there is nothing to build and nothing to compile.

Then open <http://localhost:8000>. The connection form is pre-filled to point at
a bundled sample database — just hit **Connect** and you'll see its tables.

> **Building from source instead:** copy `docker-compose.override.yml.example`
> to `docker-compose.override.yml`. It builds the image from your working tree
> and mounts the tree for live reload — that is the development setup.
>
> **Pinning a version:** set `CLI2UI_IMAGE=jiniie/cli2ui:1.3.0` in `.env`.

To point at your own PostgreSQL, change the form fields (host, port, db, user,
password) and connect.

Expand Down
21 changes: 21 additions & 0 deletions docker-compose.override.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Developer live-reload override (optional).
#
# End users do NOT need this — `docker compose up` pulls the published image.
# For development, copy this file to docker-compose.override.yml; Compose merges
# it automatically, builds from your working tree instead of pulling, and mounts
# the tree so code changes are picked up without rebuilding:
#
# cp docker-compose.override.yml.example docker-compose.override.yml
#
services:
app:
# Build from this working tree rather than pulling the published image.
build: .
volumes:
- .:/app
# The mount above shadows /app, so the management DB goes back to the
# project root (db.sqlite3, gitignored) — the pre-image default, and handy
# when you want to inspect or delete it from the host.
- /data
environment:
CLI2UI_DB_PATH: /app/db.sqlite3
15 changes: 13 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
services:
app:
build: .
# The published image by default, so the first run is a pull rather than a
# multi-minute apt/pip build on a laptop that has no reason to compile
# anything. To build from your working tree instead, copy
# docker-compose.override.yml.example — Compose merges it and its `build:`
# wins. Pin a version with CLI2UI_IMAGE (e.g. jiniie/cli2ui:1.3.0).
image: ${CLI2UI_IMAGE:-jiniie/cli2ui:latest}
ports:
- "8000:8000"
environment:
# Saved connections and auto-backups live in one SQLite file. Without the
# source tree mounted it would sit inside the container and disappear the
# next time the container is recreated, so put it on a named volume.
CLI2UI_DB_PATH: /data/db.sqlite3
volumes:
- .:/app
- cli2ui-data:/data
# Lets you reach a database running elsewhere on the host (another container
# that publishes a port, or a native install) by connecting cli2ui to
# host.docker.internal. Docker Desktop (Mac/Windows) provides this name
Expand Down Expand Up @@ -72,3 +82,4 @@ services:

volumes:
airlines-data:
cli2ui-data:
1 change: 1 addition & 0 deletions docs/index.en.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ <h2 class="text-2xl font-semibold tracking-tight">Up and running in one command<

<div class="mt-6 rounded-lg border border-zinc-800 bg-black/40 p-4 font-mono text-sm">
<div class="prompt text-zinc-100">docker compose up</div>
<div class="mt-2 text-zinc-500"># pulls the published image — nothing to build</div>
<div class="mt-2 text-zinc-500"># then open <span class="text-sky-300">http://localhost:8000</span></div>
<div class="mt-1 text-zinc-600"># port 8000 taken? remap in docker-compose.yml: <span class="text-zinc-400">"8001:8000"</span></div>
</div>
Expand Down
1 change: 1 addition & 0 deletions docs/index.ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ <h2 class="text-2xl font-semibold tracking-tight">1コマンドで起動</h2>

<div class="mt-6 rounded-lg border border-zinc-800 bg-black/40 p-4 font-mono text-sm">
<div class="prompt text-zinc-100">docker compose up</div>
<div class="mt-2 text-zinc-500"># 公開イメージを pull する(ビルド待ちなし)</div>
<div class="mt-2 text-zinc-500"># ブラウザで <span class="text-sky-300">http://localhost:8000</span> を開く</div>
<div class="mt-1 text-zinc-600"># 8000 が使用中なら docker-compose.yml で変更: <span class="text-zinc-400">"8001:8000"</span></div>
</div>
Expand Down