36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
# # # seanime
|
|
# # # docer deploy builds
|
|
#
|
|
# Oryginal Code:
|
|
# https://github.com/5rahim/seanime/releases/latest
|
|
#
|
|
ARG VERSION=latest
|
|
|
|
FROM alpine:latest as downloader
|
|
WORKDIR /src
|
|
RUN apk add --no-cache curl tar bash wget
|
|
RUN TAG=$(curl -s https://api.github.com/repos/5rahim/seanime/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') && \
|
|
wget -O seanime.tar.gz https://github.com/5rahim/seanime/archive/refs/tags/${TAG}.tar.gz && \
|
|
tar -xzvf seanime.tar.gz --strip-components=1
|
|
|
|
FROM node:18-alpine AS frontend-build
|
|
WORKDIR /app/seanime-web
|
|
COPY --from=downloader /src/seanime*/seanime-web ./
|
|
RUN npm install
|
|
RUN npm run build
|
|
RUN mkdir -p /app/web && cp -r out/* /app/web/
|
|
|
|
FROM golang:1.23-alpine AS backend-build
|
|
WORKDIR /app
|
|
COPY --from=downloader /src/seanime* ./
|
|
COPY --from=frontend-build /app/web ./web
|
|
RUN go build -o seanime -trimpath -ldflags="-s -w"
|
|
|
|
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"]
|