Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
witchsky.app Dockerfile.embedr
1.9 kB · 84 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485FROM golang:1.26-bookworm AS build-env
WORKDIR /usr/src/social-app
ENV DEBIAN_FRONTEND=noninteractive
# NodeENV NODE_VERSION=24.19.0ENV NVM_DIR=/usr/share/nvm
# GoENV GODEBUG="netdns=go"ENV GOOS="linux"ARG TARGETARCHENV GOARCH=${TARGETARCH:-amd64}ENV CGO_ENABLED=1ENV GOEXPERIMENT="loopvar"
# CI environment for pnpmENV CI=true
COPY . .
## Generate the JavaScript webpack. NOTE: this will change#RUN mkdir --parents $NVM_DIR && \ wget \ --output-document=/tmp/nvm-install.sh \ https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh && \ bash /tmp/nvm-install.sh
RUN \. "$NVM_DIR/nvm.sh" && \ nvm install $NODE_VERSION && \ nvm use $NODE_VERSION && \ npm install --global pnpm@11.21.0 && \ pnpm install --frozen-lockfile && \ cd bskyembed && pnpm install --frozen-lockfile && cd .. && \ pnpm intl:build && \ pnpm build-embed
# DEBUGRUN find ./bskyweb/embedr-static && find ./bskyweb/embedr-templates && find ./bskyembed/dist
# hack around issue with empty directory and go:embedRUN touch bskyweb/static/js/empty.txtRUN touch bskyweb/static/css/empty.txtRUN touch bskyweb/static/media/empty.txt
## Generate the embedr Go binary.#RUN cd bskyweb/ && \ go mod download && \ go mod verify
RUN cd bskyweb/ && \ go build \ -v \ -trimpath \ -tags timetzdata \ -o /embedr \ ./cmd/embedr
FROM debian:bookworm-slim
ENV GODEBUG=netdns=goENV TZ=Etc/UTCENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --yes \ dumb-init \ ca-certificates
ENTRYPOINT ["dumb-init", "--"]
WORKDIR /embedrCOPY --from=build-env /embedr /usr/bin/embedr
CMD ["/usr/bin/embedr"]
LABEL org.opencontainers.image.source=https://github.com/bluesky-social/social-appLABEL org.opencontainers.image.description="embed.bsky.app Web App"LABEL org.opencontainers.image.licenses=MIT