add Dockerfile

This commit is contained in:
2026-02-20 20:25:37 +03:00
parent 1f65301a05
commit 30705b0769
2 changed files with 37 additions and 0 deletions

31
Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
FROM node:25-alpine AS web-builder
WORKDIR /app
RUN npm i -g pnpm
COPY ./web/package.json ./web/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY ./web/ ./
RUN pnpm build
FROM golang:1.26-alpine AS api-builder
WORKDIR /app
RUN apk add --no-cache gcc musl-dev
COPY go.mod go.sum ./
RUN go mod verify && go mod download
COPY . .
COPY --from=web-builder /app/dist ./web/dist
RUN CGO_ENABLED=1 go build -o tvqueue .
FROM alpine:latest
WORKDIR /app
COPY --from=api-builder /app/tvqueue /app/music-downloader
EXPOSE 5000
ENTRYPOINT ["/app/music-downloader"]