-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Apps-Engine Deno Runtime update (#31821)
Co-authored-by: Rafael Tapia <[email protected]>
- Loading branch information
1 parent
2ef71e8
commit 4f72d62
Showing
33 changed files
with
622 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
'@rocket.chat/omnichannel-services': minor | ||
'rocketchat-services': minor | ||
'@rocket.chat/omnichannel-transcript': minor | ||
'@rocket.chat/authorization-service': minor | ||
'@rocket.chat/web-ui-registration': minor | ||
'@rocket.chat/stream-hub-service': minor | ||
'@rocket.chat/uikit-playground': minor | ||
'@rocket.chat/presence-service': minor | ||
'@rocket.chat/fuselage-ui-kit': minor | ||
'@rocket.chat/instance-status': minor | ||
'@rocket.chat/account-service': minor | ||
'@rocket.chat/mock-providers': minor | ||
'@rocket.chat/api-client': minor | ||
'@rocket.chat/ddp-client': minor | ||
'@rocket.chat/pdf-worker': minor | ||
'@rocket.chat/ui-theming': minor | ||
'@rocket.chat/core-services': minor | ||
'@rocket.chat/model-typings': minor | ||
'@rocket.chat/ui-video-conf': minor | ||
'@rocket.chat/core-typings': minor | ||
'@rocket.chat/rest-typings': minor | ||
'@rocket.chat/ddp-streamer': minor | ||
'@rocket.chat/queue-worker': minor | ||
'@rocket.chat/presence': minor | ||
'@rocket.chat/ui-composer': minor | ||
'@rocket.chat/ui-contexts': minor | ||
'@rocket.chat/license': minor | ||
'@rocket.chat/gazzodown': minor | ||
'@rocket.chat/ui-avatar': minor | ||
'@rocket.chat/ui-client': minor | ||
'@rocket.chat/livechat': minor | ||
'@rocket.chat/models': minor | ||
'@rocket.chat/ui-kit': minor | ||
'@rocket.chat/apps': minor | ||
'@rocket.chat/cron': minor | ||
'@rocket.chat/i18n': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
New runtime for apps in the Apps-Engine based on the Deno platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,68 @@ | ||
FROM node:14.21.3-alpine3.16 | ||
|
||
RUN apk add --no-cache ttf-dejavu | ||
ENV LANG=C.UTF-8 | ||
|
||
# Installing glibc deps required by Deno | ||
# This replaces libc6-compat | ||
# Copied from https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc, which denoland/deno:alpine-1.37.1 uses | ||
# NOTE: Glibc 2.35 package is broken: https://github.com/sgerrand/alpine-pkg-glibc/issues/176, so we stick to 2.34 for now | ||
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \ | ||
ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \ | ||
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ | ||
echo \ | ||
"-----BEGIN PUBLIC KEY-----\ | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\ | ||
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\ | ||
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\ | ||
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\ | ||
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\ | ||
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\ | ||
1QIDAQAB\ | ||
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
wget \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \ | ||
apk add --no-cache --force-overwrite \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
\ | ||
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \ | ||
rm "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
(/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true) && \ | ||
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \ | ||
\ | ||
apk del glibc-i18n && \ | ||
\ | ||
rm "/root/.wget-hsts" && \ | ||
apk del .build-dependencies && \ | ||
rm \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
apk add --no-cache ttf-dejavu | ||
|
||
ADD . /app | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
# needs a mongo instance - defaults to container linking with alias 'mongo' | ||
ENV DEPLOY_METHOD=docker \ | ||
NODE_ENV=production \ | ||
MONGO_URL=mongodb://mongo:27017/rocketchat \ | ||
HOME=/tmp \ | ||
PORT=3000 \ | ||
ROOT_URL=http://localhost:3000 \ | ||
Accounts_AvatarStorePath=/app/uploads \ | ||
DENO_DIR=/usr/share/deno | ||
|
||
RUN set -x \ | ||
&& apk add --no-cache --virtual .fetch-deps python3 make g++ libc6-compat \ | ||
&& apk add --no-cache --virtual .fetch-deps python3 make g++ \ | ||
&& cd /app/bundle/programs/server \ | ||
&& npm install --production \ | ||
# Start hack for sharp... | ||
|
@@ -20,20 +75,14 @@ RUN set -x \ | |
&& npm install [email protected] \ | ||
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \ | ||
# End hack for isolated-vm | ||
&& cd npm \ | ||
# Cache Deno dependencies for Apps-Engine | ||
&& cd npm/node_modules/@rocket.chat/apps-engine/deno-runtime \ | ||
&& /app/bundle/programs/server/npm/node_modules/deno-bin/bin/deno cache main.ts \ | ||
&& cd /app/bundle/programs/server/npm \ | ||
&& npm rebuild bcrypt --build-from-source \ | ||
&& npm cache clear --force \ | ||
&& apk del .fetch-deps | ||
|
||
# needs a mongo instance - defaults to container linking with alias 'mongo' | ||
ENV DEPLOY_METHOD=docker \ | ||
NODE_ENV=production \ | ||
MONGO_URL=mongodb://mongo:27017/rocketchat \ | ||
HOME=/tmp \ | ||
PORT=3000 \ | ||
ROOT_URL=http://localhost:3000 \ | ||
Accounts_AvatarStorePath=/app/uploads | ||
|
||
VOLUME /app/uploads | ||
|
||
WORKDIR /app/bundle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
apps/meteor/app/statistics/server/lib/getAppsStatistics.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.