Compare commits

...
2 Commits
4 changed files with 20 additions and 19 deletions
+4
View File
@@ -1,3 +1,7 @@
# Ignore Git metadata
.git
.gitignore
# IDEs & System Files # IDEs & System Files
.idea/ .idea/
.DS_Store .DS_Store
+11 -11
View File
@@ -5,7 +5,7 @@
# builds (podman builds all --platform targets concurrently). # builds (podman builds all --platform targets concurrently).
# Declare the automatic build arguments # Declare the automatic build arguments
ARG BUILDPLATFORM ARG BUILDPLATFORM
FROM --platform=$BUILDPLATFORM node:lts-trixie-slim AS base FROM --platform=$BUILDPLATFORM docker.io/library/node:lts-trixie-slim AS base
# Install dependencies only when needed # Install dependencies only when needed
FROM base AS deps FROM base AS deps
@@ -36,7 +36,7 @@ RUN \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi
FROM python:3.14-slim AS runner FROM docker.io/library/python:3.14-slim AS runner
LABEL maintainer="Amritanshu <docker@tanshu.com>" LABEL maintainer="Amritanshu <docker@tanshu.com>"
RUN apt-get update \ RUN apt-get update \
@@ -69,15 +69,6 @@ WORKDIR /app/
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment # Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment
ENV PATH="/app/.venv/bin:$PATH" ENV PATH="/app/.venv/bin:$PATH"
# Pass the version from the Makefile. The build context has no usable .git
# (a git-URL build is a tag-less shallow clone and git is not installed), so
# hatch-vcs cannot discover the version itself. hatch-vcs calls
# setuptools_scm without a dist name, so only the generic
# SETUPTOOLS_SCM_PRETEND_VERSION is honored - the
# SETUPTOOLS_SCM_PRETEND_VERSION_FOR_<NAME> variant is silently ignored.
ARG SETUPTOOLS_SCM_PRETEND_VERSION
ENV SETUPTOOLS_SCM_PRETEND_VERSION=$SETUPTOOLS_SCM_PRETEND_VERSION
# Install dependencies # Install dependencies
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers # Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
@@ -87,6 +78,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
COPY /brewman ./ COPY /brewman ./
# Pass the version from the Makefile. The build context has no usable .git
# (git archive stream / shallow clone lacks git metadata), so
# hatch-vcs cannot discover the version itself. hatch-vcs calls
# setuptools_scm without a dist name, so only the generic
# SETUPTOOLS_SCM_PRETEND_VERSION is honored - the
# SETUPTOOLS_SCM_PRETEND_VERSION_FOR_<NAME> variant is silently ignored.
ARG SETUPTOOLS_SCM_PRETEND_VERSION
ENV SETUPTOOLS_SCM_PRETEND_VERSION=$SETUPTOOLS_SCM_PRETEND_VERSION
# hatch-vcs generates _version.py only inside uv's isolated wheel build, so # hatch-vcs generates _version.py only inside uv's isolated wheel build, so
# the source tree copied here lacks it. Write it ourselves (from the same # the source tree copied here lacks it. Write it ourselves (from the same
# build arg) so importing brewman from /app works identically to the # build arg) so importing brewman from /app works identically to the
+4 -7
View File
@@ -3,13 +3,12 @@ build-production: ## Build the production container image. Usage: make build-pro
@test -n "$(TAG)" || { echo "Usage: make build-production TAG=15.4.0" >&2; exit 1; } @test -n "$(TAG)" || { echo "Usage: make build-production TAG=15.4.0" >&2; exit 1; }
@echo "Building image..." @echo "Building image..."
@podman manifest rm registry.tanshu.com/brewman:latest 2>/dev/null || true @podman manifest rm registry.tanshu.com/brewman:latest 2>/dev/null || true
@podman build \ @git archive --format=tar "v$(TAG)" | podman build \
--format docker \
--platform linux/amd64,linux/arm64 \ --platform linux/amd64,linux/arm64 \
--manifest registry.tanshu.com/brewman:latest \ --manifest registry.tanshu.com/brewman:latest \
--pull \ --pull \
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(TAG) \ --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(TAG) \
https://git.tanshu.com/tanshu/brewman.git#v$(TAG) -
@echo "Pushing manifests..." @echo "Pushing manifests..."
@podman manifest push --all registry.tanshu.com/brewman:latest docker://registry.tanshu.com/brewman:latest @podman manifest push --all registry.tanshu.com/brewman:latest docker://registry.tanshu.com/brewman:latest
@@ -20,13 +19,12 @@ build-check: ## Multi-arch build without push (compile check). Usage: make build
@test -n "$(TAG)" || { echo "Usage: make build-check TAG=15.4.0" >&2; exit 1; } @test -n "$(TAG)" || { echo "Usage: make build-check TAG=15.4.0" >&2; exit 1; }
@echo "Building image..." @echo "Building image..."
@podman manifest rm brewman:test 2>/dev/null || true @podman manifest rm brewman:test 2>/dev/null || true
@podman build \ @git archive --format=tar "v$(TAG)" | podman build \
--format docker \
--platform linux/amd64,linux/arm64 \ --platform linux/amd64,linux/arm64 \
--manifest brewman:test \ --manifest brewman:test \
--pull \ --pull \
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(TAG) \ --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(TAG) \
https://git.tanshu.com/tanshu/brewman.git#v$(TAG) -
.PHONY: build-check-local .PHONY: build-check-local
# Defaults the version when built without a tag; an explicit TAG still wins. # Defaults the version when built without a tag; an explicit TAG still wins.
@@ -35,7 +33,6 @@ build-check-local: ## Single-arch build without push (compile check). Usage: mak
@echo "Building image..." @echo "Building image..."
@podman manifest rm brewman:test 2>/dev/null || true @podman manifest rm brewman:test 2>/dev/null || true
@podman build \ @podman build \
--format docker \
--platform linux/amd64 \ --platform linux/amd64 \
--manifest brewman:test \ --manifest brewman:test \
--no-cache \ --no-cache \
@@ -34,7 +34,7 @@
autocomplete="off" autocomplete="off"
/> />
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayFn"> <mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayFn">
@for (account of accounts(); track account) { @for (account of accounts(); track account.id) {
<mat-option [value]="account">{{ account.name }}</mat-option> <mat-option [value]="account">{{ account.name }}</mat-option>
} }
</mat-autocomplete> </mat-autocomplete>