From 26348bf358987b219a79ac92605a8a7bc26cf11a Mon Sep 17 00:00:00 2001 From: ra_ma Date: Sat, 20 Sep 2025 13:14:57 +0100 Subject: [PATCH] first build --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..816c1ee --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Stage 1: Build React/Next.js frontend +FROM node:18-alpine AS frontend-build +WORKDIR /app/seanime-web +COPY seanime-web ./ +RUN npm install +RUN npm run build +RUN mkdir -p /app/web && cp -r out/* /app/web/ + +# Stage 2: Build Go backend +FROM golang:1.23-alpine AS backend-build +WORKDIR /app +COPY . . +COPY --from=frontend-build /app/web ./web +RUN go build -o seanime -trimpath -ldflags="-s -w" + +# Stage 3: Production container +FROM alpine:latest +WORKDIR /app +COPY --from=backend-build /app/seanime . +COPY --from=backend-build /app/web ./web +EXPOSE 43211 +VOLUME ["/DATA"] +CMD ["./seanime", "--datadir", "/DATA", "--port", "43211"]