forked from rivenmedia/riven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (41 loc) · 1.47 KB
/
Dockerfile
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
# Frontend Builder
FROM node:20-alpine AS frontend
WORKDIR /app
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ .
RUN npm run build && npm prune --production
# Final Image
FROM node:20-alpine
LABEL name="Iceberg" \
description="Iceberg Debrid Downloader" \
url="https://github.com/dreulavelle/iceberg"
# Install system dependencies
RUN apk --update add --no-cache python3 curl bash shadow && \
rm -rf /var/cache/apk/*
# Install Poetry globally
ENV POETRY_HOME="/etc/poetry"
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN curl -sSL https://install.python-poetry.org | python3 - --yes
# Setup the application directory
WORKDIR /iceberg
# Expose ports
EXPOSE 3000 8080
# Set environment variable to force color output
ENV FORCE_COLOR=1
ENV TERM=xterm-256color
# Copy frontend build from the previous stage
COPY --from=frontend --chown=node:node /app/build /iceberg/frontend/build
COPY --from=frontend --chown=node:node /app/node_modules /iceberg/frontend/node_modules
COPY --from=frontend --chown=node:node /app/package.json /iceberg/frontend/package.json
# Copy the Python project files
COPY pyproject.toml poetry.lock* /iceberg/
# Install Python dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-dev
# Copy backend code and other necessary files
COPY backend/ /iceberg/backend
COPY VERSION entrypoint.sh /iceberg/
# Ensure entrypoint script is executable
RUN chmod +x ./entrypoint.sh
ENTRYPOINT ["/bin/sh", "-c", "/iceberg/entrypoint.sh"]