init
This commit is contained in:
49
docker/appview/Dockerfile
Normal file
49
docker/appview/Dockerfile
Normal file
@@ -0,0 +1,49 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
RUN apt-get update && apt-get install -y git gcc libc6-dev nodejs npm curl unzip && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /build
|
||||
COPY repos/core/ .
|
||||
|
||||
# static assets required for go:embed
|
||||
RUN mkdir -p appview/pages/static/fonts appview/pages/static/icons appview/pages/static/logos
|
||||
|
||||
# JS
|
||||
RUN curl -sLo appview/pages/static/htmx.min.js https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js && \
|
||||
curl -sLo appview/pages/static/htmx-ext-ws.min.js https://unpkg.com/htmx-ext-ws@2.0.2/ws.js && \
|
||||
curl -sLo appview/pages/static/mermaid.min.js https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js && \
|
||||
touch appview/pages/static/actor-typeahead.js
|
||||
|
||||
# Fonts
|
||||
RUN curl -sLo /tmp/inter.zip https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip && \
|
||||
cd /tmp && unzip -q inter.zip -d inter && \
|
||||
find /tmp/inter -name 'InterVariable*.woff2' -exec cp {} /build/appview/pages/static/fonts/ \; && \
|
||||
find /tmp/inter -name 'InterDisplay*.woff2' -exec cp {} /build/appview/pages/static/fonts/ \; || true
|
||||
|
||||
RUN curl -sLo /tmp/plex.zip https://github.com/IBM/plex/releases/download/v6.4.0/IBM-Plex-Mono.zip && \
|
||||
cd /tmp && unzip -q plex.zip -d plex && \
|
||||
find /tmp/plex -name 'IBMPlexMono*.woff2' -exec cp {} /build/appview/pages/static/fonts/ \; || true
|
||||
|
||||
# Lucide icons
|
||||
RUN curl -sLo /tmp/lucide.zip https://github.com/lucide-icons/lucide/releases/download/0.344.0/lucide-icons-0.344.0.zip && \
|
||||
cd /tmp && unzip -q lucide.zip -d lucide && \
|
||||
find /tmp/lucide -name '*.svg' -exec cp {} /build/appview/pages/static/icons/ \; || true
|
||||
|
||||
# Placeholder logos
|
||||
RUN touch appview/pages/static/logos/dolly.png appview/pages/static/logos/dolly.ico appview/pages/static/logos/dolly.svg
|
||||
|
||||
# Custom logos (place files in docker/appview/logos/)
|
||||
COPY docker/appview/logos/ appview/pages/static/logos/
|
||||
|
||||
# Tailwind CSS (v3 - matches tailwind.config.js)
|
||||
RUN cd /build && npm install tailwindcss@3 @tailwindcss/typography && \
|
||||
npx tailwindcss -c tailwind.config.js -i input.css -o appview/pages/static/tw.css --minify 2>&1 && \
|
||||
echo "tw.css size: $(wc -c < appview/pages/static/tw.css) bytes"
|
||||
|
||||
# Build
|
||||
RUN CGO_ENABLED=1 go build -o appview-bin ./cmd/appview/
|
||||
|
||||
# --- AppView ---
|
||||
FROM debian:bookworm-slim AS appview
|
||||
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /build/appview-bin /usr/local/bin/appview
|
||||
EXPOSE 3000
|
||||
CMD ["appview"]
|
||||
Reference in New Issue
Block a user