Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM node:16.15-slim as client
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
RUN npm install react-scripts@5.0.1 -g --silent && npm cache clean --force;
COPY app/client/ ./
RUN npm run build

Expand Down Expand Up @@ -95,8 +94,12 @@ COPY --from=ffmpeg-builder /usr/local/lib/lib* /usr/local/lib/
# Install runtime dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
nginx-extras supervisor \
python3.9 python3-pip python3-dev \
python3.14 python3.14-dev python3.14-venv \
libldap2-dev libsasl2-dev libssl-dev \
libffi-dev libc-dev \
build-essential \
Expand All @@ -106,6 +109,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
libx264-163 libx265-199 libvpx7 libaom3 \
libopus0 libvorbis0a libvorbisenc2 \
libass9 libfreetype6 libmp3lame0 \
&& python3.14 -m ensurepip --upgrade \
&& python3.14 -m pip install --upgrade --break-system-packages pip \
&& ln -sf /usr/bin/python3.14 /usr/bin/python3 \
&& ln -sf /usr/bin/python3.14 /usr/bin/python \
&& rm -rf /var/lib/apt/lists/*

# Create symlinks and configure library path
Expand All @@ -130,10 +137,9 @@ 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 /app/server
RUN python3.14 -m pip install --no-cache-dir --break-system-packages --ignore-installed /app/server

ENV FLASK_APP /app/server/fireshare:create_app()
ENV FLASK_ENV production
ENV ENVIRONMENT production
ENV DATA_DIRECTORY /data
ENV VIDEO_DIRECTORY /videos
Expand Down
6 changes: 2 additions & 4 deletions app/client/.env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
REACT_APP_VERSION=$npm_package_version
REACT_APP_NAME=$npm_package_name
# REACT_APP_SERVER_PORT is not set here so that API requests go through
# the React dev server proxy (configured in package.json) to avoid CORS issues.
# VITE_SERVER_PORT is not set here so that API requests go through
# the Vite dev server proxy (configured in vite.config.js) to avoid CORS issues.
5 changes: 1 addition & 4 deletions app/client/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
REACT_APP_VERSION=$npm_package_version
REACT_APP_NAME=$npm_package_name
# DO NOT ADD THE REACT_APP_SERVER_PORT ENV VARIABLE THAT EXISTS IN THE
# PRODUCTION ENV FILE TO THIS FILE
# DO NOT ADD VITE_SERVER_PORT TO THIS FILE
25 changes: 25 additions & 0 deletions app/client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Self host your media and share with unique links." />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<title>Fireshare</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.js"></script>
</body>
</html>
Loading
Loading