Files
WattpadDownloader/Dockerfile
T

51 lines
1.1 KiB
Docker
Raw Normal View History

2023-12-29 03:07:07 +00:00
FROM node:20
WORKDIR /build
COPY src/frontend/package*.json .
RUN rm -rf node_modules
RUN rm -rf build
RUN npm install
COPY src/frontend/. .
RUN npm run build
# Thanks https://stackoverflow.com/q/76988450
FROM python:3.10-slim
WORKDIR /app
2024-12-02 17:02:23 -05:00
2024-12-22 11:03:44 +00:00
# Install git, exiftool
RUN apt update
2024-12-22 11:03:44 +00:00
RUN apt install -y git build-essential xorg libssl-dev libxrender-dev libpango-1.0-0 wget
2024-12-06 15:28:32 +00:00
ENV EXIFTOOL_VERSION="13.06"
RUN wget "https://exiftool.org/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz"
2024-12-08 12:32:18 +00:00
RUN gzip -dc "Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz" | tar -xf -
2024-12-06 15:28:32 +00:00
WORKDIR /app/Image-ExifTool-${EXIFTOOL_VERSION}
RUN perl Makefile.PL
RUN make test
2024-12-08 11:25:35 +00:00
RUN make install
2024-12-06 15:28:32 +00:00
RUN rm -rf /var/lib/apt/lists/* /app/Image-ExifTool-${EXIFTOOL_VERSION}
WORKDIR /app
# --- #
2024-12-02 17:02:23 -05:00
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
2023-12-29 03:07:07 +00:00
COPY src/api/requirements.txt requirements.txt
2024-12-06 15:28:32 +00:00
COPY src/api/exiftool.config exiftool.config
RUN uv pip install -r requirements.txt --system
2024-12-06 15:28:32 +00:00
COPY --from=0 /build/build /app/src/build
COPY src/api/src src
2024-12-22 11:03:44 +00:00
# Is this still needed?
RUN ln -s /app/src/pdf/fonts /tmp/fonts
2024-12-06 15:28:32 +00:00
WORKDIR /app/src
2023-12-29 03:07:07 +00:00
EXPOSE 80
CMD [ "python3", "main.py"]