first build

This commit is contained in:
ra_ma
2025-09-20 13:14:57 +01:00
parent e0b672f009
commit 26348bf358

23
Dockerfile Normal file
View File

@@ -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"]