From 51c6108278389f01b469b7d9cccd995cb5cc69bc Mon Sep 17 00:00:00 2001 From: Jay Ravani Date: Mon, 27 Jul 2026 10:20:22 +0200 Subject: [PATCH] refactor: rename api server binary from app to ignis The HTTP API server binary was named app, which is fine inside its own Makefile/Dockerfile context but meaningless once installed alongside other tools (e.g. via go install, which names the binary after its package directory -- cmd/app produced a binary literally called app). Moves cmd/app/main.go -> cmd/ignis/main.go and updates every place that builds or runs it: Makefile, Dockerfile, docker-compose.yml, and docs. The ignis-app Docker Compose service/container name is unchanged -- that's the shared - naming convention across the building-simulation namespace (ignis-app, buem-app, etc.), not the compiled binary name, and stays as-is. --- Makefile | 4 ++-- cmd/{app => ignis}/main.go | 0 docs/getting-started.md | 4 ++-- documentation/content/07-deployment-view.md | 2 +- environment/Dockerfile | 2 +- environment/docker-compose.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename cmd/{app => ignis}/main.go (100%) diff --git a/Makefile b/Makefile index fad8492..4bece64 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ build: build-app build-db build-validate ## build-app: compile the HTTP API server build-app: - go build -o $(BIN)/app cmd/app/main.go + go build -o $(BIN)/ignis cmd/ignis/main.go ## build-db: compile the database loader (destructive — drops and recreates tables) build-db: @@ -20,7 +20,7 @@ build-validate: ## run: build and start the HTTP API server run: build-app - ./$(BIN)/app + ./$(BIN)/ignis ## create-db: create the database if absent (or drop only the tabula schema if it exists), then populate via build_db create-db: build-db diff --git a/cmd/app/main.go b/cmd/ignis/main.go similarity index 100% rename from cmd/app/main.go rename to cmd/ignis/main.go diff --git a/docs/getting-started.md b/docs/getting-started.md index b5aa0ee..db7a31f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -37,7 +37,7 @@ cp .env.example .env ## Build ```bash -go build -o bin/app cmd/app/main.go +go build -o bin/ignis cmd/ignis/main.go go build -o bin/build_db cmd/build_db/main.go go build -o bin/validate cmd/validate/main.go ``` @@ -53,7 +53,7 @@ Loads the TABULA workbook into PostgreSQL. This is destructive: it drops and rec ## Run the API ```bash -./bin/app # starts on :8080 +./bin/ignis # starts on :8080 ``` ## Validate diff --git a/documentation/content/07-deployment-view.md b/documentation/content/07-deployment-view.md index bb3d042..e65fb4a 100644 --- a/documentation/content/07-deployment-view.md +++ b/documentation/content/07-deployment-view.md @@ -6,7 +6,7 @@ ignis runs as three containers, defined in `environment/docker-compose.yml`. The 1. **ignis-reverse-proxy**: Caddy, from the `caddy:2.11-alpine` image. The only container that publishes a host port. Every request passes through it first. -2. **ignis-app**: the `bin/app` binary, built from `environment/Dockerfile`. Listens on the internal port (default 8080), publishes no host port, and reaches the database at `ignis-db`. +2. **ignis-app**: the `bin/ignis` binary, built from `environment/Dockerfile`. Listens on the internal port (default 8080), publishes no host port, and reaches the database at `ignis-db`. 3. **ignis-db**: PostgreSQL, from `postgres:17-alpine`. Publishes no host port. Its data lives in a named volume (`ignis-db-data`) that survives `docker compose down`/`up`, but not `down -v`. diff --git a/environment/Dockerfile b/environment/Dockerfile index dd439fe..be0535d 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -27,7 +27,7 @@ ENV PATH="${GOROOT}/bin:${PATH}" WORKDIR /app COPY . . RUN go mod tidy \ - && go build -o bin/app cmd/app/main.go \ + && go build -o bin/ignis cmd/ignis/main.go \ && go build -o bin/build_db cmd/build_db/main.go \ && go build -o bin/validate cmd/validate/main.go diff --git a/environment/docker-compose.yml b/environment/docker-compose.yml index 1354941..832ac82 100644 --- a/environment/docker-compose.yml +++ b/environment/docker-compose.yml @@ -39,7 +39,7 @@ services: condition: service_healthy # No `ports:` mapping here on purpose — the app is not reachable from the # host directly. Only the reverse proxy is exposed; everyone else must go through it. - command: ./bin/app # run the server directly (was: interactive dev shell) + command: ./bin/ignis # run the server directly (was: interactive dev shell) healthcheck: test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:$$APP_PORT/health"] interval: 5s