Skip to content

Commit

Permalink
Merge pull request #142 from humanmade/965-update-node-v
Browse files Browse the repository at this point in the history
Update tachyon to nodejs14.x
  • Loading branch information
roborourke authored Dec 3, 2021
2 parents a030109 + 49acbdc commit d82520f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ services:
notifications:
email: false

before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

before_script:
- npm run build-node-modules

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lambci/lambda:nodejs10.x
FROM public.ecr.aws/lambda/nodejs:14
COPY node_modules/ /var/task/node_modules
COPY server.js /var/task/
COPY index.js /var/task
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ FROM node:14-alpine

# Install build base
RUN apk --update add --no-cache \
# --repository https://dl-cdn.alpinelinux.org/alpine/edge/community \
--virtual build-deps fftw-dev gcc g++ make libc6-compat python
--virtual build-deps fftw-dev gcc g++ make libc6-compat python3
RUN apk --update add --no-cache \
# --repository https://dl-cdn.alpinelinux.org/alpine/edge/community \
vips-dev

# Get app
Expand Down
3 changes: 0 additions & 3 deletions hooks/pre_build

This file was deleted.

2 changes: 1 addition & 1 deletion local-api-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ http.createServer(function (request, response) {
queryStringParameters: querystring.parse( query ),
headers: request.headers,
};
const childArgs = ['run', '--rm', '-e', `S3_BUCKET=${ bucket }`, '-e', `S3_REGION=${ region }`, '-v', `${ task }:/var/task`, 'lambci/lambda:nodejs10.x', 'lambda-handler.handler', JSON.stringify(args)];
const childArgs = ['run', '--rm', '-e', `S3_BUCKET=${ bucket }`, '-e', `S3_REGION=${ region }`, '-v', `${ task }:/var/task`, 'public.ecr.aws/lambda/nodejs:14', 'lambda-handler.handler', JSON.stringify(args)];
const child = spawn('docker', childArgs);
var stdout = '';
child.stdout.on('data', data => stdout += data);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"function-name": ""
},
"scripts": {
"build-node-modules": "rm -R node_modules ; docker run --rm -v `pwd`:/var/task lambci/lambda:build-nodejs10.x npm install",
"test-file": "docker run --rm -e S3_BUCKET=hmn-uploads-eu -e S3_REGION=eu-west-1 -v `pwd`:/var/task lambci/lambda:nodejs10.x lambda-handler.handler '{\"path\":\"/'$npm_config_path'\", \"headers\":{}}'",
"test": "docker run --rm -v `pwd`:/var/task -it --entrypoint='node' lambci/lambda:nodejs10.x /var/task/test-filesize/index.js",
"update-test-fixtures": "docker run --rm -v `pwd`:/var/task -it --entrypoint='node' lambci/lambda:nodejs10.x /var/task/test-filesize/index.js --update-fixtures",
"build-node-modules": "rm -R node_modules ; docker run --rm -v `pwd`:/var/task public.ecr.aws/sam/build-nodejs14.x:latest npm install",
"test-file": "docker run --rm -e S3_BUCKET=hmn-uploads-eu -e S3_REGION=eu-west-1 -v `pwd`:/var/task public.ecr.aws/lambda/nodejs:14 \"lambda-handler.handler '{\"path\":\"/'$npm_config_path'\", \"headers\":{}}'\"",
"test": "docker run --rm -v `pwd`:/var/task -it --entrypoint='node' public.ecr.aws/lambda/nodejs:14 /var/task/test-filesize/index.js",
"update-test-fixtures": "docker run --rm -v `pwd`:/var/task -it --entrypoint='node' public.ecr.aws/lambda/nodejs:14 /var/task/test-filesize/index.js --update-fixtures",
"build-zip": "rm lambda.zip; zip -r --exclude='node_modules/aws-sdk/*' --exclude='node_modules/animated-gif-detector/test/*' lambda.zip ./node_modules/ index.js proxy-file.js lambda-handler.js",
"upload-zip": "aws s3 --region=$npm_config_region cp ./lambda.zip s3://$npm_config_bucket/$npm_config_path",
"update-function-code": "aws lambda update-function-code --region $npm_config_region --function-name $npm_config_function_name --zip-file fileb://`pwd`/lambda.zip"
Expand Down

0 comments on commit d82520f

Please sign in to comment.