Skip to content

Commit

Permalink
feat: add frontend to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ugnmura committed Jan 6, 2024
1 parent c37834c commit 4b63960
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
FROM node:alpine AS frontend-builder
WORKDIR /frontend

COPY frontend/package.json frontend/pnpm-lock.yaml ./

RUN npm install -g pnpm
RUN pnpm install

COPY frontend/ .

RUN pnpm build

FROM golang:alpine AS builder
RUN apk update
RUN apk add musl-dev gcc alsa-lib-dev
Expand All @@ -8,13 +20,14 @@ COPY go.mod go.sum ./
RUN go mod download && go mod verify

COPY . .
COPY --from=frontend-builder /frontend/build /frontend/build
RUN go build

FROM alpine as runner
RUN apk update
RUN apk add sqlite ffmpeg py3-pip --no-cache

RUN pip install yt-dlp spotdl
RUN pip install yt-dlp spotdl --break-system-packages

WORKDIR /

Expand Down

0 comments on commit 4b63960

Please sign in to comment.