Skip to content

Commit 5202bcf

Browse files
authored
Merge pull request #516 from ShaneIsrael/upgrade-python-node
Update to python 3.14 | Convert to Vite project on Node 24
2 parents 507594b + 9d47731 commit 5202bcf

18 files changed

Lines changed: 2446 additions & 17478 deletions

File tree

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
FROM node:16.15-slim as client
1+
FROM node:24-slim as client
22
WORKDIR /app
33
ENV PATH /app/node_modules/.bin:$PATH
44
COPY app/client/package.json ./
55
COPY app/client/package-lock.json ./
66
COPY app/client/.env.* ./
77
RUN npm ci --silent
8-
RUN npm install react-scripts@5.0.1 -g --silent && npm cache clean --force;
98
COPY app/client/ ./
109
RUN npm run build
1110

@@ -95,8 +94,12 @@ COPY --from=ffmpeg-builder /usr/local/lib/lib* /usr/local/lib/
9594
# Install runtime dependencies
9695
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
9796
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
97+
software-properties-common \
98+
&& add-apt-repository ppa:deadsnakes/ppa \
99+
&& DEBIAN_FRONTEND=noninteractive apt-get update \
100+
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
98101
nginx-extras supervisor \
99-
python3.9 python3-pip python3-dev \
102+
python3.14 python3.14-dev python3.14-venv \
100103
libldap2-dev libsasl2-dev libssl-dev \
101104
libffi-dev libc-dev \
102105
build-essential \
@@ -106,6 +109,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
106109
libx264-163 libx265-199 libvpx7 libaom3 \
107110
libopus0 libvorbis0a libvorbisenc2 \
108111
libass9 libfreetype6 libmp3lame0 \
112+
&& python3.14 -m ensurepip --upgrade \
113+
&& python3.14 -m pip install --upgrade --break-system-packages pip \
114+
&& ln -sf /usr/bin/python3.14 /usr/bin/python3 \
115+
&& ln -sf /usr/bin/python3.14 /usr/bin/python \
109116
&& rm -rf /var/lib/apt/lists/*
110117

111118
# Create symlinks and configure library path
@@ -130,10 +137,9 @@ COPY app/server/ /app/server
130137
COPY migrations/ /migrations
131138
COPY --from=client /app/build /app/build
132139
COPY --from=client /app/package.json /app
133-
RUN pip install --no-cache-dir /app/server
140+
RUN python3.14 -m pip install --no-cache-dir --break-system-packages --ignore-installed /app/server
134141

135142
ENV FLASK_APP /app/server/fireshare:create_app()
136-
ENV FLASK_ENV production
137143
ENV ENVIRONMENT production
138144
ENV DATA_DIRECTORY /data
139145
ENV VIDEO_DIRECTORY /videos

app/client/.env.development

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
REACT_APP_VERSION=$npm_package_version
2-
REACT_APP_NAME=$npm_package_name
3-
# REACT_APP_SERVER_PORT is not set here so that API requests go through
4-
# the React dev server proxy (configured in package.json) to avoid CORS issues.
1+
# VITE_SERVER_PORT is not set here so that API requests go through
2+
# the Vite dev server proxy (configured in vite.config.js) to avoid CORS issues.

app/client/.env.production

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
REACT_APP_VERSION=$npm_package_version
2-
REACT_APP_NAME=$npm_package_name
3-
# DO NOT ADD THE REACT_APP_SERVER_PORT ENV VARIABLE THAT EXISTS IN THE
4-
# PRODUCTION ENV FILE TO THIS FILE
1+
# DO NOT ADD VITE_SERVER_PORT TO THIS FILE

app/client/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
7+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
8+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
9+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
10+
<meta name="msapplication-TileColor" content="#da532c" />
11+
<meta name="theme-color" content="#ffffff" />
12+
13+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
14+
<meta name="theme-color" content="#000000" />
15+
<meta name="description" content="Self host your media and share with unique links." />
16+
<link rel="apple-touch-icon" href="/logo192.png" />
17+
<link rel="manifest" href="/manifest.json" />
18+
<title>Fireshare</title>
19+
</head>
20+
<body>
21+
<noscript>You need to enable JavaScript to run this app.</noscript>
22+
<div id="root"></div>
23+
<script type="module" src="/src/index.js"></script>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)