static_paths only includes: assets, fonts, images, js The css directory is NOT served by Phoenix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
981 B
Docker
27 lines
981 B
Docker
FROM ghcr.io/asciinema/asciinema-server:latest AS base
|
|
|
|
# Download the source to find and patch the template
|
|
FROM elixir:1.18-alpine AS builder
|
|
|
|
# Install git and build dependencies
|
|
RUN apk add --no-cache git build-base nodejs npm
|
|
|
|
# Clone the asciinema-server repository
|
|
WORKDIR /app
|
|
RUN git clone https://github.com/asciinema/asciinema-server.git .
|
|
RUN git checkout v1.0.0
|
|
|
|
# Patch the layout template to inject custom theme
|
|
RUN sed -i '/<\/head>/i\ <!-- Custom Pivoine Rose Theme -->\n <link rel="stylesheet" href="/theme/custom.css" />\n <link rel="icon" type="image/svg+xml" href="/theme/favicon.svg" />' \
|
|
lib/asciinema_web/templates/layout/app.html.heex
|
|
|
|
# Build the release
|
|
RUN mix local.hex --force && \
|
|
mix local.rebar --force && \
|
|
mix deps.get --only prod && \
|
|
MIX_ENV=prod mix do compile, assets.deploy, release
|
|
|
|
# Final image: copy the patched release over the base image
|
|
FROM base
|
|
COPY --from=builder /app/_build/prod/rel/asciinema /opt/app/
|