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` | Vitest (unit + integration), excludes `e2e/` |
|
||||||
| `make test-e2e` | Playwright e2e (uncached) |
|
| `make test-e2e` | Playwright e2e (uncached) |
|
||||||
| `make smoke-docker` | Local: build image + hermetic smoke test of the `/api` proxy (Docker required) |
|
| `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 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 prod` | Run the web container from the published image (pulls `ghcr…:latest`) |
|
||||||
| `make compose-down` | Stop + remove the web container |
|
| `make down` | Stop + remove the web container (dev or prod) |
|
||||||
|
| `make clean` | `down` + remove the locally built image |
|
||||||
| `make check` | lint + typecheck + test |
|
| `make check` | lint + typecheck + test |
|
||||||
| `pnpm --filter @openconcho/desktop cargo-check` | Local Rust/Tauri compile check before pushing desktop changes |
|
| `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` |
|
| `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 \
|
.PHONY: bootstrap dev dev-web dev-desktop \
|
||||||
build test test-e2e lint lint-fix typecheck check \
|
build test test-e2e lint lint-fix typecheck check \
|
||||||
ci-web ci-desktop smoke-docker \
|
ci-web ci-desktop smoke-docker \
|
||||||
compose-up compose-up-prod compose-down install help
|
up prod down clean install help
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
|
@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)
|
smoke-docker: ## Local: build the image + smoke-test the /api proxy (Docker required)
|
||||||
bash docker/smoke-test.sh
|
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
|
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
|
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
|
docker compose down --remove-orphans
|
||||||
|
|
||||||
|
clean: down ## down + remove the locally built image
|
||||||
|
-docker image rm openconcho-web:local
|
||||||
|
|
||||||
install: ## pnpm install (no playwright)
|
install: ## pnpm install (no playwright)
|
||||||
pnpm install
|
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
|
```bash
|
||||||
# Dev-forward — build from this repo and run your local changes:
|
# 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:
|
# 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
|
# → http://localhost:8080
|
||||||
```
|
```
|
||||||
|
|
||||||
`make compose-up` uses [`docker-compose.yml`](docker-compose.yml) (`build: .`);
|
`make up` uses [`docker-compose.yml`](docker-compose.yml) (`build: .`);
|
||||||
`make compose-up-prod` layers [`docker-compose.prod.yml`](docker-compose.prod.yml)
|
`make prod` layers [`docker-compose.prod.yml`](docker-compose.prod.yml)
|
||||||
to pull `ghcr…:latest`. `OPENCONCHO_DEFAULT_HONCHO_URL` seeds the first instance
|
to pull `ghcr…:latest`. `OPENCONCHO_DEFAULT_HONCHO_URL` seeds the first instance
|
||||||
(absolute URL); `OPENCONCHO_UPSTREAM_ALLOWLIST` is an optional SSRF guard
|
(absolute URL); `OPENCONCHO_UPSTREAM_ALLOWLIST` is an optional SSRF guard
|
||||||
(comma-separated host globs) for when you expose the proxy. Full details and env
|
(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,
|
# 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.
|
# 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
|
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||||
services:
|
services:
|
||||||
openconcho:
|
openconcho:
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
# OpenConcho web UI — DEV-FORWARD compose (builds from THIS repo).
|
# OpenConcho web UI — DEV-FORWARD compose (builds from THIS repo).
|
||||||
#
|
#
|
||||||
# make compose-up # build from source + run → http://localhost:8080
|
# make up # build from source + run → http://localhost:8080
|
||||||
# make compose-up-prod # pull the published image instead (see docker-compose.prod.yml)
|
# make prod # pull the published image instead (see docker-compose.prod.yml)
|
||||||
# make compose-down # stop + remove
|
# 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
|
# 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
|
# URL named in the per-request X-Honcho-Upstream header (no browser CORS). Seed the
|
||||||
# first instance with OPENCONCHO_DEFAULT_HONCHO_URL:
|
# 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 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
|
# 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`).
|
image** (`ghcr.io/offendingcommit/openconcho-web:latest`, `pull_policy: always`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make compose-up # build from source + run → http://localhost:8080
|
make up # build from source + run → http://localhost:8080
|
||||||
make compose-up-prod # pull ghcr…:latest instead of building
|
make prod # pull ghcr…:latest instead of building
|
||||||
make compose-down # stop + remove
|
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
|
`docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d`. Set env
|
||||||
inline or via a `.env` file:
|
inline or via a `.env` file:
|
||||||
|
|
||||||
```bash
|
```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
|
The published image is multi-arch (amd64 + arm64); the first publish creates a
|
||||||
|
|||||||
Reference in New Issue
Block a user