Compare commits
12 Commits
e0b672f009
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb3bac9ff5 | ||
|
|
6db73c926f | ||
| 1abb370706 | |||
|
|
958bd63caf | ||
|
|
0de342189a | ||
|
|
f254bae251 | ||
|
|
3d298fa434 | ||
|
|
c6ebbe069d | ||
|
|
8e531fc054 | ||
|
|
a273dfeee5 | ||
|
|
ca62675866 | ||
|
|
26348bf358 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -163,3 +163,8 @@ go.work.sum
|
|||||||
# env file
|
# env file
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# Project Specific
|
||||||
|
seanime-*/
|
||||||
|
tag.file
|
||||||
|
v*.tar.gz
|
||||||
|
DATA/
|
||||||
|
|||||||
66
Dockerfile
Normal file
66
Dockerfile
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
ARG VERSION=latest
|
||||||
|
|
||||||
|
# Prep Files
|
||||||
|
FROM alpine:latest as downloader
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN apk add --no-cache curl tar wget
|
||||||
|
|
||||||
|
# Fetch the latest tag and download the source code
|
||||||
|
RUN curl -s https://api.github.com/repos/5rahim/seanime/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' > tag.file && \
|
||||||
|
TAG=$(cat tag.file) && \
|
||||||
|
wget https://github.com/5rahim/seanime/archive/refs/tags/${TAG}.tar.gz && \
|
||||||
|
tar -xzvf ${TAG}.tar.gz && \
|
||||||
|
rm ${TAG}.tar.gz tag.file && \
|
||||||
|
mv seanime-* seanime
|
||||||
|
|
||||||
|
|
||||||
|
# Start web build
|
||||||
|
FROM node:18-alpine AS frontend-build
|
||||||
|
|
||||||
|
# Set working directory to the extracted source code
|
||||||
|
WORKDIR /app/seanime-web
|
||||||
|
|
||||||
|
# Copy source from downloader
|
||||||
|
COPY --from=downloader /src/seanime/seanime-web ./
|
||||||
|
|
||||||
|
# Build the web interface
|
||||||
|
RUN npm install && \
|
||||||
|
npm run build && \
|
||||||
|
mkdir -p /app/web && \
|
||||||
|
cp -r out/* /app/web/
|
||||||
|
|
||||||
|
# Start backend build
|
||||||
|
FROM golang:1.25-alpine AS backend-build
|
||||||
|
|
||||||
|
# set build root
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
# Copy needed files from previous stages
|
||||||
|
COPY --from=downloader /src/seanime /build
|
||||||
|
COPY --from=frontend-build /app/web /build/web
|
||||||
|
|
||||||
|
# Build the server for Linux
|
||||||
|
RUN go build -o seanime -trimpath -ldflags="-s -w"
|
||||||
|
|
||||||
|
# Complete the APP
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# Add FFMPEG to the final image
|
||||||
|
RUN apk add --no-cache jellyfin-ffmpeg mesa-dri-gallium mesa-va-gallium linux-firmware-amdgpu
|
||||||
|
|
||||||
|
# Set root
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy preped builds
|
||||||
|
COPY --from=backend-build /build/seanime .
|
||||||
|
|
||||||
|
# Set up the data directory
|
||||||
|
VOLUME /DATA
|
||||||
|
|
||||||
|
# Expose the port
|
||||||
|
EXPOSE 43211
|
||||||
|
|
||||||
|
# Command to run the server
|
||||||
|
CMD ["/app/seanime", "--datadir", "/DATA"]
|
||||||
Reference in New Issue
Block a user