mirror of
https://github.com/Screenly/Anthias.git
synced 2025-12-23 22:38:05 -05:00
chore: migrate Node.js from v18.x to v22.x (#2491)
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
{% if environment == 'production' %}
|
||||
FROM debian:bookworm AS node-builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install \
|
||||
nodejs \
|
||||
npm
|
||||
{% include 'nodejs-install.j2' %}
|
||||
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
@@ -40,6 +37,8 @@ WORKDIR /usr/src/app
|
||||
COPY --from=node-builder \
|
||||
/app/static/dist/ \
|
||||
/usr/src/app/static/dist/
|
||||
{% else %}
|
||||
{% include 'nodejs-install.j2' %}
|
||||
{% endif %}
|
||||
|
||||
ENV GIT_HASH={{ git_hash }}
|
||||
|
||||
@@ -34,6 +34,8 @@ RUN --mount=type=cache,target=/var/cache/apt \
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% include 'nodejs-install.j2' %}
|
||||
|
||||
# @TODO: Uncomment the lines below when test_add_asset_streaming is fixed.
|
||||
# WORKDIR /opt/ffmpeg
|
||||
# COPY --from=builder /opt/ffmpeg/ffserver ./
|
||||
|
||||
13
docker/nodejs-install.j2
Normal file
13
docker/nodejs-install.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
{% if board in ['pi1', 'pi2'] %}
|
||||
RUN apt-get update && \
|
||||
apt-get -y install \
|
||||
nodejs \
|
||||
npm
|
||||
{% else %}
|
||||
RUN apt-get update && \
|
||||
apt-get -y install \
|
||||
curl \
|
||||
ca-certificates && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
||||
apt-get -y install nodejs
|
||||
{% endif %}
|
||||
23
package-lock.json
generated
23
package-lock.json
generated
@@ -1887,13 +1887,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.26.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz",
|
||||
"integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==",
|
||||
"version": "7.28.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.3.tgz",
|
||||
"integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
@@ -5357,10 +5355,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@@ -10664,12 +10663,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
|
||||
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/regexp.prototype.flags": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
|
||||
|
||||
@@ -93,9 +93,6 @@ def build_image(
|
||||
context.update(get_test_context())
|
||||
elif service == 'wifi-connect':
|
||||
context.update(get_wifi_connect_context(target_platform))
|
||||
elif service == 'server':
|
||||
if environment == 'development':
|
||||
base_apt_dependencies.extend(['nodejs', 'npm'])
|
||||
|
||||
generate_dockerfile(service, {
|
||||
'base_image': base_image,
|
||||
|
||||
@@ -90,8 +90,6 @@ def get_test_context() -> dict:
|
||||
'libcups2',
|
||||
'libxcomposite1',
|
||||
'libxdamage1',
|
||||
'nodejs',
|
||||
'npm',
|
||||
],
|
||||
'chrome_dl_url': chrome_dl_url,
|
||||
'chromedriver_dl_url': chromedriver_dl_url,
|
||||
|
||||
Reference in New Issue
Block a user