1
0
Fork 0
mirror of synced 2024-05-29 17:09:48 +12:00

Merge pull request #1044 from appwrite/feat-python-3.9-env

feat-python-3.9-env
This commit is contained in:
Eldad A. Fux 2021-04-04 11:36:33 +03:00 committed by GitHub
commit e801fa383d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 1 deletions

View file

@ -70,6 +70,15 @@ $environments = [
'logo' => 'python.png',
'supports' => [System::X86, System::PPC, System::ARM],
],
'python-3.9' => [
'name' => 'Python',
'version' => '3.9',
'base' => 'python:3.9-alpine',
'image' => 'appwrite/env-python-3.9:1.0.0',
'build' => '/usr/src/code/docker/environments/python-3.9',
'logo' => 'python.png',
'supports' => [System::X86, System::PPC, System::ARM],
],
'deno-1.2' => [
'name' => 'Deno',
'version' => '1.2',

View file

@ -381,7 +381,7 @@ return [
'name' => '_APP_FUNCTIONS_ENVS',
'description' => 'This option allows you to limit the available environments for cloud functions. This option is very useful for low-cost servers to safe disk space.\n\nTo enable/activate this option, pass a list of allowed environments separated by a comma.\n\nCurrently, supported environments are: ' . \implode(', ', \array_keys(Config::getParam('providers'))),
'introduction' => '0.7.0',
'default' => 'node-14.5,deno-1.6,php-7.4,python-3.8,ruby-3.0,dotnet-5.0',
'default' => 'node-14.5,deno-1.6,php-7.4,python-3.9,ruby-3.0,dotnet-5.0',
'required' => false,
'question' => '',
],

View file

@ -24,6 +24,9 @@ docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
echo 'Python 3.8...'
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-python-3.8:1.0.0 ./docker/environments/python-3.8/ --push
echo 'Python 3.9...'
docker buildx build --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-python-3.9:1.0.0 ./docker/environments/python-3.9/ --push
echo 'Ruby 2.7...'
docker buildx build --platform linux/amd64,linux/arm64,linux/386,linux/ppc64le -t appwrite/env-ruby-2.7:1.0.2 ./docker/environments/ruby-2.7/ --push

View file

@ -0,0 +1,11 @@
FROM python:3.9-alpine
LABEL maintainer="team@appwrite.io"
RUN apk add tar
RUN mkdir /usr/local/src
WORKDIR /usr/local/src/
ENV PYTHONPATH "${PYTHONPATH}:/usr/local/src/.appwrite"

View file

@ -485,6 +485,14 @@ class FunctionsCustomServerTest extends Scope
'command' => 'python main.py',
'timeout' => 15,
],
[
'language' => 'Python',
'version' => '3.9',
'name' => 'python-3.9',
'code' => $functions.'/python.tar.gz',
'command' => 'python main.py',
'timeout' => 15,
],
[
'language' => 'Node.js',
'version' => '14.5',