forked from anibridge/anibridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
74 lines (51 loc) · 2.04 KB
/
Dockerfile
File metadata and controls
74 lines (51 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM python:3.13-alpine AS python-builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_LINK_MODE=copy \
UV_PROJECT_ENVIRONMENT=/opt/venv \
UV_PYTHON_DOWNLOADS=never
RUN apk add --no-cache git
WORKDIR /tmp
RUN --mount=type=bind,source=uv.lock,target=/tmp/uv.lock,ro \
--mount=type=bind,source=pyproject.toml,target=/tmp/pyproject.toml,ro \
--mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --no-install-project
FROM node:25-alpine AS node-builder
WORKDIR /app
ENV CI=1 \
PNPM_HOME=/pnpm \
PNPM_STORE_DIR=/pnpm/store
ENV PATH="$PNPM_HOME:$PATH"
RUN npm install -g pnpm
RUN --mount=type=bind,source=frontend/pnpm-lock.yaml,target=/app/pnpm-lock.yaml,ro \
--mount=type=bind,source=frontend/package.json,target=/app/package.json,ro \
--mount=type=cache,id=pnpm-store,target=/pnpm/store \
pnpm install --frozen-lockfile
COPY ./frontend /app
RUN pnpm build
FROM python:3.13-alpine
RUN apk add --no-cache shadow su-exec
LABEL maintainer="Elias Benbourenane <eliasbenbourenane@gmail.com>" \
org.opencontainers.image.title="PlexAniBridge" \
org.opencontainers.image.description="The smart way to keep your AniList profile perfectly synchronized with your Plex library." \
org.opencontainers.image.authors="Elias Benbourenane <eliasbenbourenane@gmail.com>" \
org.opencontainers.image.url="https://plexanibridge.elias.eu.org" \
org.opencontainers.image.documentation="https://plexanibridge.elias.eu.org" \
org.opencontainers.image.source="https://github.com/eliasbenb/PlexAniBridge" \
org.opencontainers.image.licenses="MIT"
ENV PYTHONPATH=/opt/venv/lib/python3.13/site-packages \
PYTHONUNBUFFERED=1 \
PUID=1000 \
PGID=1000 \
UMASK=022 \
PAB_DATA_PATH=/config
WORKDIR /app
COPY . /app
COPY ./scripts/docker_init.sh /init
RUN rm -rf /app/frontend && \
mkdir -p /config
COPY --from=python-builder /opt/venv /opt/venv
COPY --from=node-builder /app/build /app/frontend/build
VOLUME ["/config"]
EXPOSE 4848
ENTRYPOINT ["/init"]
CMD ["python", "/app/main.py"]