diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b37ef24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM lambci/lambda:nodejs10.x +COPY node_modules/ /var/task/node_modules +COPY server.js /var/task/ +COPY index.js /var/task + +ARG AWS_REGION +ARG AWS_S3_BUCKET +ARG AWS_S3_ENDPOINT +ARG PORT + +# Start the reactor +EXPOSE ${PORT:-8080} +ENTRYPOINT /var/lang/bin/node server.js ${PORT:-8080} diff --git a/hooks/pre_build b/hooks/pre_build new file mode 100755 index 0000000..46d7f78 --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,3 @@ +#!/bin/bash +# Build node_modules +docker run --rm -v `pwd`:/var/task lambci/lambda:build-nodejs10.x npm install --production