mirror of
https://github.com/hanzoai/ads.git
synced 2026-09-30 20:39:45 +00:00
The ad plane at api.hanzo.ai/v1/ad had no screen of its own. This adds one beside the Go module, built the same way as Hanzo Social: campaigns with their totals, a campaign to launch, pause, edit or delete, ad accounts connected through /v1/integration, and spend against budget. It shows only what the API returns, so there is no targeting, creative or delivery data to draw. Co-authored-by: Hanzo Dev <[email protected]>
24 lines
770 B
Docker
24 lines
770 B
Docker
# syntax=docker/dockerfile:1.7
|
|
# Hanzo Ads — the Vite SPA built once, served by hanzoai/spa.
|
|
FROM node:24-alpine AS build
|
|
WORKDIR /build
|
|
ENV CI=true PNPM_HOME=/pnpm PATH=$PNPM_HOME:$PATH
|
|
RUN corepack enable && corepack prepare [email protected] --activate
|
|
|
|
# pnpm-workspace.yaml holds the catalog and the one-gui-runtime overrides.
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
COPY tsconfig.json vite.config.ts index.html ./
|
|
COPY src src
|
|
|
|
# `pnpm build` typechecks first. An empty vite build still exits 0, hence the tests.
|
|
RUN pnpm build \
|
|
&& [ -s dist/index.html ] \
|
|
&& [ -d dist/assets ]
|
|
|
|
# hanzoai/spa answers index.html for every route.
|
|
FROM ghcr.io/hanzoai/spa:1.4.11
|
|
COPY --from=build /build/dist /public
|
|
EXPOSE 3000
|