-
-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathDockerfile.lite
More file actions
65 lines (60 loc) · 2.12 KB
/
Dockerfile.lite
File metadata and controls
65 lines (60 loc) · 2.12 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
FROM node:24-slim AS client
WORKDIR /app
ENV PATH=/app/node_modules/.bin:$PATH
COPY app/client/package.json ./
COPY app/client/package-lock.json ./
COPY app/client/.env.* ./
RUN npm ci --silent
COPY app/client/ ./
RUN npm run build
# Main application stage — Debian slim with Python 3.14 built in, no CUDA, no source-built FFmpeg
FROM python:3.14-slim-bookworm
WORKDIR /
RUN apt-get update && apt-get install --no-install-recommends -y \
nginx-extras supervisor \
libldap2-dev libsasl2-dev libssl-dev \
libffi-dev libc-dev \
build-essential \
gosu \
ca-certificates \
tzdata \
ffmpeg \
libldap-2.5-0 libsasl2-2 \
&& rm -rf /var/lib/apt/lists/* /root/.cache/pip /tmp/*
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
RUN adduser --disabled-password --gecos '' nginx
RUN mkdir /data && mkdir /processed
COPY entrypoint.sh /
COPY entrypoint-lite.sh /
COPY app/nginx/prod.conf /etc/nginx/nginx.conf
COPY app/nginx/error.html /etc/nginx/error.html
COPY app/nginx/api_unavailable.html /etc/nginx/api_unavailable.html
COPY app/server/ /app/server
COPY migrations/ /migrations
COPY --from=client /app/build /app/build
COPY --from=client /app/package.json /app
RUN pip install --no-cache-dir --ignore-installed /app/server \
&& apt-get purge -y --auto-remove \
libldap2-dev libsasl2-dev libssl-dev \
libffi-dev libc-dev \
build-essential \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /root/.cache/pip /tmp/*
ENV FLASK_APP=/app/server/fireshare:create_app()
ENV ENVIRONMENT=production
ENV DATA_DIRECTORY=/data
ENV VIDEO_DIRECTORY=/videos
ENV IMAGE_DIRECTORY=/images
ENV PROCESSED_DIRECTORY=/processed
ENV TEMPLATE_PATH=/app/server/fireshare/templates
ENV ADMIN_PASSWORD=admin
ENV ANALYTICS_TRACKING_SCRIPT=""
ENV TZ=UTC
ENV PATH=/usr/local/bin:$PATH
# GPU transcoding is permanently disabled in the lite image — NVENC is not available.
# entrypoint-lite.sh enforces TRANSCODE_GPU=false at runtime, overriding any user-supplied value.
ENV FIRESHARE_LITE=true
ENV TRANSCODE_GPU=false
EXPOSE 80
CMD ["bash", "/entrypoint-lite.sh"]