refactor(make): rename compose targets to up/prod/down/clean
Concise verbs: make up (dev build+run), make prod (pull published image), make down (stop regardless of mode), make clean (down + drop local image). Updates all docs and compose-file comment headers to match.
This commit is contained in:
@@ -17,9 +17,10 @@ Frontend UI for self-hosted Honcho instances — browse memories, peers, session
|
||||
| `make test` | Vitest (unit + integration), excludes `e2e/` |
|
||||
| `make test-e2e` | Playwright e2e (uncached) |
|
||||
| `make smoke-docker` | Local: build image + hermetic smoke test of the `/api` proxy (Docker required) |
|
||||
| `make compose-up` | Run the web container from source (dev-forward, builds) at :8080 |
|
||||
| `make compose-up-prod` | Run the web container from the published image (pulls `ghcr…:latest`) |
|
||||
| `make compose-down` | Stop + remove the web container |
|
||||
| `make up` | Run the web container from source (dev-forward, builds) at :8080 |
|
||||
| `make prod` | Run the web container from the published image (pulls `ghcr…:latest`) |
|
||||
| `make down` | Stop + remove the web container (dev or prod) |
|
||||
| `make clean` | `down` + remove the locally built image |
|
||||
| `make check` | lint + typecheck + test |
|
||||
| `pnpm --filter @openconcho/desktop cargo-check` | Local Rust/Tauri compile check before pushing desktop changes |
|
||||
| `pnpm --filter @openconcho/web generate:api` | Regen `src/api/schema.d.ts` from `openapi.json` |
|
||||
|
||||
11
Makefile
11
Makefile
@@ -5,7 +5,7 @@
|
||||
.PHONY: bootstrap dev dev-web dev-desktop \
|
||||
build test test-e2e lint lint-fix typecheck check \
|
||||
ci-web ci-desktop smoke-docker \
|
||||
compose-up compose-up-prod compose-down install help
|
||||
up prod down clean install help
|
||||
|
||||
help:
|
||||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
|
||||
@@ -51,14 +51,17 @@ ci-desktop: ## CI: cargo-check for @openconcho/desktop
|
||||
smoke-docker: ## Local: build the image + smoke-test the /api proxy (Docker required)
|
||||
bash docker/smoke-test.sh
|
||||
|
||||
compose-up: ## Run the web container from source (builds; dev-forward) at :8080
|
||||
up: ## Run the web container from source (dev-forward, builds) at :8080
|
||||
docker compose up -d --build
|
||||
|
||||
compose-up-prod: ## Run the web container from the published image (pulls latest)
|
||||
prod: ## Run the web container from the published image (pulls ghcr latest)
|
||||
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||
|
||||
compose-down: ## Stop and remove the web container
|
||||
down: ## Stop + remove the web container (works for dev or prod)
|
||||
docker compose down --remove-orphans
|
||||
|
||||
clean: down ## down + remove the locally built image
|
||||
-docker image rm openconcho-web:local
|
||||
|
||||
install: ## pnpm install (no playwright)
|
||||
pnpm install
|
||||
|
||||
11
README.md
11
README.md
@@ -97,17 +97,18 @@ Two Compose modes (the published image is `ghcr.io/offendingcommit/openconcho-we
|
||||
|
||||
```bash
|
||||
# Dev-forward — build from this repo and run your local changes:
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make compose-up
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make up
|
||||
|
||||
# Production — pull the latest published image instead of building:
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make compose-up-prod
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make prod
|
||||
|
||||
make compose-down # stop + remove
|
||||
make down # stop + remove (dev or prod)
|
||||
make clean # down + drop the locally built image
|
||||
# → http://localhost:8080
|
||||
```
|
||||
|
||||
`make compose-up` uses [`docker-compose.yml`](docker-compose.yml) (`build: .`);
|
||||
`make compose-up-prod` layers [`docker-compose.prod.yml`](docker-compose.prod.yml)
|
||||
`make up` uses [`docker-compose.yml`](docker-compose.yml) (`build: .`);
|
||||
`make prod` layers [`docker-compose.prod.yml`](docker-compose.prod.yml)
|
||||
to pull `ghcr…:latest`. `OPENCONCHO_DEFAULT_HONCHO_URL` seeds the first instance
|
||||
(absolute URL); `OPENCONCHO_UPSTREAM_ALLOWLIST` is an optional SSRF guard
|
||||
(comma-separated host globs) for when you expose the proxy. Full details and env
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Layer it on top of docker-compose.yml; it reuses every setting there (env, ports,
|
||||
# extra_hosts) and only swaps the local build for the latest published image.
|
||||
#
|
||||
# make compose-up-prod
|
||||
# make prod
|
||||
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||
services:
|
||||
openconcho:
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
# OpenConcho web UI — DEV-FORWARD compose (builds from THIS repo).
|
||||
#
|
||||
# make compose-up # build from source + run → http://localhost:8080
|
||||
# make compose-up-prod # pull the published image instead (see docker-compose.prod.yml)
|
||||
# make compose-down # stop + remove
|
||||
# make up # build from source + run → http://localhost:8080
|
||||
# make prod # pull the published image instead (see docker-compose.prod.yml)
|
||||
# make down # stop + remove (dev or prod)
|
||||
# make clean # down + drop the locally built image
|
||||
#
|
||||
# The SPA issues all Honcho calls same-origin to /api; nginx forwards each to the
|
||||
# URL named in the per-request X-Honcho-Upstream header (no browser CORS). Seed the
|
||||
# first instance with OPENCONCHO_DEFAULT_HONCHO_URL:
|
||||
#
|
||||
# OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make compose-up
|
||||
# OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make up
|
||||
#
|
||||
# To fold into an existing Honcho Compose stack, set OPENCONCHO_DEFAULT_HONCHO_URL
|
||||
# to the api service (e.g. http://api:8000 — nginx resolves it on the compose
|
||||
|
||||
@@ -24,17 +24,18 @@ Two Compose files, env/ports defined once in the base:
|
||||
image** (`ghcr.io/offendingcommit/openconcho-web:latest`, `pull_policy: always`).
|
||||
|
||||
```bash
|
||||
make compose-up # build from source + run → http://localhost:8080
|
||||
make compose-up-prod # pull ghcr…:latest instead of building
|
||||
make compose-down # stop + remove
|
||||
make up # build from source + run → http://localhost:8080
|
||||
make prod # pull ghcr…:latest instead of building
|
||||
make down # stop + remove (dev or prod)
|
||||
make clean # down + drop the locally built image
|
||||
```
|
||||
|
||||
`make compose-up-prod` expands to
|
||||
`make prod` expands to
|
||||
`docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d`. Set env
|
||||
inline or via a `.env` file:
|
||||
|
||||
```bash
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make compose-up-prod
|
||||
OPENCONCHO_DEFAULT_HONCHO_URL=https://honcho.example.net make prod
|
||||
```
|
||||
|
||||
The published image is multi-arch (amd64 + arm64); the first publish creates a
|
||||
|
||||
Reference in New Issue
Block a user