Merge pull request #836 from appwrite/feat-new-node-version
Feat new node version
This commit is contained in:
commit
5aa062ec22
6 changed files with 32 additions and 4 deletions
|
@ -42,7 +42,7 @@ script:
|
||||||
deploy:
|
deploy:
|
||||||
- provider: script
|
- provider: script
|
||||||
edge: true
|
edge: true
|
||||||
script: ./deploy.sh
|
script: ./.travis-ci/deploy.sh
|
||||||
on:
|
on:
|
||||||
repo: appwrite/appwrite
|
repo: appwrite/appwrite
|
||||||
branch: deploy
|
branch: deploy
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* List of Appwrite Cloud Functions supported environments
|
* List of Appwrite Cloud Functions supported environments
|
||||||
*/
|
*/
|
||||||
return [
|
return [
|
||||||
'node-14' => [
|
'node-14.5' => [
|
||||||
'name' => 'Node.js',
|
'name' => 'Node.js',
|
||||||
'version' => '14.5',
|
'version' => '14.5',
|
||||||
'base' => 'node:14.5-alpine',
|
'base' => 'node:14.5-alpine',
|
||||||
|
@ -11,6 +11,14 @@ return [
|
||||||
'build' => '/usr/src/code/docker/environments/node-14.5',
|
'build' => '/usr/src/code/docker/environments/node-14.5',
|
||||||
'logo' => 'node.png',
|
'logo' => 'node.png',
|
||||||
],
|
],
|
||||||
|
'node-15.5' => [
|
||||||
|
'name' => 'Node.js',
|
||||||
|
'version' => '15.5',
|
||||||
|
'base' => 'node:15.5-alpine',
|
||||||
|
'image' => 'appwrite/env-node-15.5:1.0.0',
|
||||||
|
'build' => '/usr/src/code/docker/environments/node-15.5',
|
||||||
|
'logo' => 'node.png',
|
||||||
|
],
|
||||||
'php-7.4' => [
|
'php-7.4' => [
|
||||||
'name' => 'PHP',
|
'name' => 'PHP',
|
||||||
'version' => '7.4',
|
'version' => '7.4',
|
||||||
|
|
|
@ -34,7 +34,7 @@ Co\run(function() use ($environments) { // Warmup: make sure images are ready t
|
||||||
$stdout = '';
|
$stdout = '';
|
||||||
$stderr = '';
|
$stderr = '';
|
||||||
|
|
||||||
Console::info('Warming up '.$environment['name'].' environment...');
|
Console::info('Warming up '.$environment['name'].' '.$environment['version'].' environment...');
|
||||||
|
|
||||||
Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr);
|
Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,9 @@ docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||||
echo 'Node 14.5...'
|
echo 'Node 14.5...'
|
||||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-14.5:1.0.0 ./docker/environments/node-14.5/ --push
|
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-14.5:1.0.0 ./docker/environments/node-14.5/ --push
|
||||||
|
|
||||||
|
echo 'Node 15.5...'
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le -t appwrite/env-node-15.5:1.0.0 ./docker/environments/node-15.5/ --push
|
||||||
|
|
||||||
echo 'PHP 7.4...'
|
echo 'PHP 7.4...'
|
||||||
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-php-7.4:1.0.0 ./docker/environments/php-7.4/ --push
|
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-php-7.4:1.0.0 ./docker/environments/php-7.4/ --push
|
||||||
|
|
||||||
|
|
9
docker/environments/node-15.5/Dockerfile
Normal file
9
docker/environments/node-15.5/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
FROM node:15.5-alpine
|
||||||
|
|
||||||
|
LABEL maintainer="team@appwrite.io"
|
||||||
|
|
||||||
|
RUN apk add tar
|
||||||
|
|
||||||
|
RUN mkdir /usr/local/src
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src/
|
|
@ -508,7 +508,15 @@ class FunctionsCustomServerTest extends Scope
|
||||||
[
|
[
|
||||||
'language' => 'Node.js',
|
'language' => 'Node.js',
|
||||||
'version' => '14.5',
|
'version' => '14.5',
|
||||||
'name' => 'node-14',
|
'name' => 'node-14.5',
|
||||||
|
'code' => $functions.'/node.tar.gz',
|
||||||
|
'command' => 'node index.js',
|
||||||
|
'timeout' => 15,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'language' => 'Node.js',
|
||||||
|
'version' => '15.5',
|
||||||
|
'name' => 'node-15.5',
|
||||||
'code' => $functions.'/node.tar.gz',
|
'code' => $functions.'/node.tar.gz',
|
||||||
'command' => 'node index.js',
|
'command' => 'node index.js',
|
||||||
'timeout' => 15,
|
'timeout' => 15,
|
||||||
|
|
Loading…
Reference in a new issue