-
Notifications
You must be signed in to change notification settings - Fork 100
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 #93 from hayd/deno-lamnda
Add dockerfile for deno on aws lambda
- Loading branch information
Showing
5 changed files
with
69 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
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
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,18 @@ | ||
FROM public.ecr.aws/lambda/provided:al2 | ||
|
||
ENV BOOTSTRAP_VERSION=1.6.0 | ||
ENV DENO_VERSION=1.6.1 | ||
|
||
ENV DENO_DIR=/tmp/deno_dir | ||
ENV DENO_INSTALL_ROOT=/usr/local | ||
|
||
RUN yum install -y unzip \ | ||
&& curl -fsSL https://github.com/denoland/deno/releases/download/v${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip \ | ||
--output deno.zip \ | ||
&& unzip -qq deno.zip \ | ||
&& rm deno.zip \ | ||
&& chmod 777 deno \ | ||
&& mv deno /bin/deno \ | ||
&& curl -fsSL https://deno.land/x/lambda@${BOOTSTRAP_VERSION}/bootstrap \ | ||
--out ${LAMBDA_RUNTIME_DIR}/bootstrap \ | ||
&& chmod 777 ${LAMBDA_RUNTIME_DIR}/bootstrap |
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,7 @@ | ||
FROM hayd/deno-lambda | ||
|
||
COPY hello.ts . | ||
RUN deno cache hello.ts | ||
|
||
|
||
CMD ["hello.handler"] |
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,16 @@ | ||
import { | ||
APIGatewayProxyEvent, | ||
APIGatewayProxyResult, | ||
Context | ||
} from "https://deno.land/x/lambda/mod.ts"; | ||
|
||
export async function handler( | ||
event: APIGatewayProxyEvent, | ||
context: Context, | ||
): Promise<APIGatewayProxyResult> { | ||
return { | ||
statusCode: 200, | ||
headers: { "content-type": "text/html;charset=utf8" }, | ||
body: `Welcome to deno`, | ||
}; | ||
} |