[WIP] music platform user data scraper
teal-fm atproto
Something went wrong. Try again.
piper Dockerfile
1.2 kB · 41 lines
Dockerfile
123456789101112131415161718192021222324252627282930313233343536373839404142FROM --platform=${BUILDPLATFORM:-linux/amd64} node:24-alpine3.21 as node_builderWORKDIR /appRUN npm install tailwindcss @tailwindcss/cli
COPY ./pages/templates /app/templatesCOPY ./pages/static /app/static
RUN npx @tailwindcss/cli -i /app/static/base.css -o /app/static/main.css -m
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.24.3-alpine3.21 as builder
ARG TARGETPLATFORMARG BUILDPLATFORMARG TARGETOSARG TARGETARCH
#needed for sqliteRUN apk add --update gcc musl-dev
# step 1. dep cacheWORKDIR /appARG TARGETPLATFORM=${BUILDPLATFORM:-linux/amd64}COPY go.mod go.sum ./RUN go mod download
# step 2. build the actual appWORKDIR /appCOPY . .#Overwrite the main.css with the one from the builderCOPY --from=node_builder /app/static/main.css /app/pages/static/main.css #generate the jwksRUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags='-w -s -extldflags "-static"' -o main ./cmdARG TARGETOS=${TARGETPLATFORM%%/*}ARG TARGETARCH=${TARGETPLATFORM##*/}
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.21#Creates an empty /db folder for docker composeWORKDIR /dbWORKDIR /appCOPY --from=builder /app/main /app/mainENTRYPOINT ["/app/main"]