-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from humanmade/docker
Add Dockerfile
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 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,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} |
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,3 @@ | ||
#!/bin/bash | ||
# Build node_modules | ||
docker run --rm -v `pwd`:/var/task lambci/lambda:build-nodejs10.x npm install --production |