2022-01-25 22:20:30 +00:00
|
|
|
FROM node:lts-alpine as builder
|
2019-11-29 20:44:49 +00:00
|
|
|
|
|
|
|
WORKDIR /metube
|
|
|
|
COPY ui ./
|
2021-07-24 22:31:58 +00:00
|
|
|
RUN npm ci && \
|
2022-06-23 20:30:09 +00:00
|
|
|
node_modules/.bin/ng build --configuration production
|
2019-11-29 20:44:49 +00:00
|
|
|
|
2022-06-19 19:15:42 +00:00
|
|
|
|
2019-11-29 20:44:49 +00:00
|
|
|
FROM python:3.8-alpine
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2023-05-10 22:29:32 +00:00
|
|
|
COPY Pipfile* docker-entrypoint.sh .
|
2019-11-29 20:44:49 +00:00
|
|
|
|
2023-05-10 22:29:32 +00:00
|
|
|
# Use sed to strip carriage-return characters from the entrypoint script (in case building on Windows)
|
2023-05-09 20:05:38 +00:00
|
|
|
# Install dependencies
|
2023-05-10 22:29:32 +00:00
|
|
|
RUN sed -i 's/\r$//g' docker-entrypoint.sh && \
|
|
|
|
chmod +x docker-entrypoint.sh && \
|
2023-06-03 18:26:23 +00:00
|
|
|
apk add --update ffmpeg aria2 coreutils shadow su-exec curl && \
|
2022-03-10 08:22:59 +00:00
|
|
|
apk add --update --virtual .build-deps gcc g++ musl-dev && \
|
2019-11-29 20:44:49 +00:00
|
|
|
pip install --no-cache-dir pipenv && \
|
|
|
|
pipenv install --system --deploy --clear && \
|
|
|
|
pip uninstall pipenv -y && \
|
|
|
|
apk del .build-deps && \
|
2023-04-10 22:00:10 +00:00
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
mkdir /.cache && chmod 777 /.cache
|
2022-06-05 01:55:22 +00:00
|
|
|
|
2019-11-29 20:44:49 +00:00
|
|
|
COPY favicon ./favicon
|
|
|
|
COPY app ./app
|
|
|
|
COPY --from=builder /metube/dist/metube ./ui/dist/metube
|
2022-05-29 08:06:38 +00:00
|
|
|
|
2022-06-19 19:15:42 +00:00
|
|
|
ENV UID=1000
|
|
|
|
ENV GID=1000
|
|
|
|
ENV UMASK=022
|
2019-11-29 20:44:49 +00:00
|
|
|
|
|
|
|
ENV DOWNLOAD_DIR /downloads
|
2022-01-26 06:25:53 +00:00
|
|
|
ENV STATE_DIR /downloads/.metube
|
2023-05-09 20:10:30 +00:00
|
|
|
ENV TEMP_DIR /downloads
|
2019-11-29 20:44:49 +00:00
|
|
|
VOLUME /downloads
|
|
|
|
EXPOSE 8081
|
2022-06-19 19:15:42 +00:00
|
|
|
CMD [ "./docker-entrypoint.sh" ]
|