first build
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user